Connector to send and list email messages to and from mailboxes
Configurations
IMAP
Configuration for operations that are performed through the IMAP (Internet Message Access Protocol) protocol.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name |
String |
The name of this configuration. With this name can be later referenced. |
x |
|
Connection |
The connection types that can be provided to this configuration. |
x |
||
Eagerly Fetch Content |
Boolean |
Indicates whether the retrieved emails should be opened and read. The default value is "true". |
true |
|
Connection Types
IMAP Connection
A ConnectionProvider that returns instances of imap based MailboxConnections.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Properties |
Object |
An additional custom set of properties to configure the connection session. |
|
|
Timeout Unit |
Enumeration, one of:
|
A TimeUnit which qualifies the #connectionTimeout, #writeTimeout and #readTimeout attributes. Defaults to SECONDS |
SECONDS |
|
Connection Timeout |
Number |
The socket connection timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Read Timeout |
Number |
The socket read timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Write Timeout |
Number |
The socket write timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Host |
String |
Host name of the mail server. |
x |
|
User |
String |
Username used to connect with the mail server. |
|
|
Password |
String |
Username password to connect with the mail server. |
|
|
Port |
String |
The port number of the mail server. '993' by default. |
993 |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors |
|
||
Disable Validation |
Boolean |
Disables connection validation |
|
|
Pooling Profile |
Characteristics of the connection pool |
|
IMAPS Connection
A ConnectionProvider that returns instances of imaps (secure) based MailboxConnections.
The returned connection is secured by TLS.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Properties |
Object |
An additional custom set of properties to configure the connection session. |
|
|
Timeout Unit |
Enumeration, one of:
|
A TimeUnit which qualifies the #connectionTimeout, #writeTimeout and #readTimeout attributes. Defaults to SECONDS |
SECONDS |
|
Connection Timeout |
Number |
The socket connection timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Read Timeout |
Number |
The socket read timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Write Timeout |
Number |
The socket write timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Host |
String |
Host name of the mail server. |
x |
|
User |
String |
Username used to connect with the mail server. |
|
|
Password |
String |
Username password to connect with the mail server. |
|
|
Port |
String |
The port number of the mail server. '993' by default. |
993 |
|
TLS Configuration |
A factory for TLS contexts. A TLS context is configured with a key store and a trust store. Allows to create a TLS secured connections. |
x |
||
Reconnection Strategy |
A retry strategy in case of connectivity errors |
|
||
Disable Validation |
Boolean |
Disables connection validation |
|
|
Pooling Profile |
Characteristics of the connection pool |
|
POP3
Configuration for operations that are performed through the POP3 (Post Office Protocol 3) protocol.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name |
String |
The name of this configuration. With this name can be later referenced. |
x |
|
Connection |
The connection types that can be provided to this configuration. |
x |
Connection Types
POP3 Connection
A ConnectionProvider that returns instances of pop3 based MailboxConnections.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Properties |
Object |
An additional custom set of properties to configure the connection session. |
|
|
Timeout Unit |
Enumeration, one of:
|
A TimeUnit which qualifies the #connectionTimeout, #writeTimeout and #readTimeout attributes. Defaults to SECONDS |
SECONDS |
|
Connection Timeout |
Number |
The socket connection timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Read Timeout |
Number |
The socket read timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Write Timeout |
Number |
The socket write timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Host |
String |
Host name of the mail server. |
x |
|
User |
String |
Username used to connect with the mail server. |
|
|
Password |
String |
Username password to connect with the mail server. |
|
|
Port |
String |
The port number of the mail server. '110' by default. |
110 |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors |
|
||
Disable Validation |
Boolean |
Disables connection validation |
|
|
Pooling Profile |
Characteristics of the connection pool |
|
POP3S Connection
A ConnectionProvider that returns instances of pop3s (secured) based MailboxConnections.
The returned connection is secured by TLS.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Properties |
Object |
An additional custom set of properties to configure the connection session. |
|
|
Timeout Unit |
Enumeration, one of:
|
A TimeUnit which qualifies the #connectionTimeout, #writeTimeout and #readTimeout attributes. Defaults to SECONDS |
SECONDS |
|
Connection Timeout |
Number |
The socket connection timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Read Timeout |
Number |
The socket read timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Write Timeout |
Number |
The socket write timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Host |
String |
Host name of the mail server. |
x |
|
User |
String |
Username used to connect with the mail server. |
|
|
Password |
String |
Username password to connect with the mail server. |
|
|
Port |
String |
The port number of the mail server. '995' by default. |
995 |
|
TLS Configuration |
A factory for TLS contexts. A TLS context is configured with a key store and a trust store. Allows to create a TLS secured connections. |
x |
||
Reconnection Strategy |
A retry strategy in case of connectivity errors |
|
||
Disable Validation |
Boolean |
Disables connection validation |
|
|
Pooling Profile |
Characteristics of the connection pool |
|
SMTP
Configuration for operations that are performed through the SMTP (Simple Mail Transfer Protocol) protocol.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name |
String |
The name of this configuration. With this name can be later referenced. |
x |
|
Connection |
The connection types that can be provided to this configuration. |
x |
||
From |
String |
The "From" sender address. The person that is going to send the messages. |
|
|
Default Encoding |
String |
Default character encoding to be used in all the messages. If not specified, the default charset in the mule configuration will be used |
|
|
Default Content Transfer Encoding |
String |
|
Connection Types
SMTP Connection
A ConnectionProvider that returns instances of smtp based SenderConnections.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Properties |
Object |
An additional custom set of properties to configure the connection session. |
|
|
Timeout Unit |
Enumeration, one of:
|
A TimeUnit which qualifies the #connectionTimeout, #writeTimeout and #readTimeout attributes. Defaults to SECONDS |
SECONDS |
|
Connection Timeout |
Number |
The socket connection timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Read Timeout |
Number |
The socket read timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Write Timeout |
Number |
The socket write timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Host |
String |
Host name of the mail server. |
x |
|
User |
String |
Username used to connect with the mail server. |
|
|
Password |
String |
Username password to connect with the mail server. |
|
|
Port |
String |
The port number of the mail server. '25' by default. |
25 |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors |
|
||
Disable Validation |
Boolean |
Disables connection validation |
|
|
Pooling Profile |
Characteristics of the connection pool |
|
SMTPS Connection
A ConnectionProvider that returns instances of smtps based MailboxConnections.
The returned connection is secured by TLS.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Properties |
Object |
An additional custom set of properties to configure the connection session. |
|
|
Timeout Unit |
Enumeration, one of:
|
A TimeUnit which qualifies the #connectionTimeout, #writeTimeout and #readTimeout attributes. Defaults to SECONDS |
SECONDS |
|
Connection Timeout |
Number |
The socket connection timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Read Timeout |
Number |
The socket read timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Write Timeout |
Number |
The socket write timeout value. This attribute works in tandem with #timeoutUnit. Defaults to 5 |
5 |
|
Host |
String |
Host name of the mail server. |
x |
|
User |
String |
Username used to connect with the mail server. |
|
|
Password |
String |
Username password to connect with the mail server. |
|
|
Port |
String |
The port number of the mail server. '465' by default. |
465 |
|
TLS Configuration |
A factory for TLS contexts. A TLS context is configured with a key store and a trust store. Allows to create a TLS secured connections. |
x |
||
Reconnection Strategy |
A retry strategy in case of connectivity errors |
|
||
Disable Validation |
Boolean |
Disables connection validation |
|
|
Pooling Profile |
Characteristics of the connection pool |
|
Associated Operations
Operations
Delete
Eliminates from the mailbox the email with id emailId.
For IMAP mailboxes all the messages scheduled for deletion (marked as DELETED) will also be erased from the folder.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Mailbox Folder |
String |
Mailbox folder where the emails are going to be deleted |
INBOX |
|
Email ID |
Number |
Email ID Number of the email to delete. |
x |
For Configurations.
Throws
-
EMAIL:RETRY_EXHAUSTED
-
EMAIL:ACCESSING_FOLDER
-
EMAIL:EMAIL_NOT_FOUND
-
EMAIL:CONNECTIVITY
Expunge Folder
Eliminates from the mailbox all the messages scheduled for deletion with the DELETED flag set. deleted
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Mailbox Folder |
String |
Mailbox folder where the emails with the 'DELETED' flag are going to be scheduled to be definitely |
INBOX |
|
For Configurations.
Throws
-
EMAIL:RETRY_EXHAUSTED
-
EMAIL:ACCESSING_FOLDER
-
EMAIL:CONNECTIVITY
List - IMAP
List all the emails (with pagination) in the configured imap mailBoxFolder that match with the specified imapMatcher criteria. retrieved by the operation (the ones which matched the IMAPEmailPredicateBuilder criteria) and doesn't imply any restriction over the amount of emails being retrieved from the mailbox server.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Mailbox Folder |
String |
Mailbox folder where the emails are going to be fetched |
INBOX |
|
Match with |
Email Matcher which gives the capability of filter the retrieved emails |
|
||
Delete After Retrieve |
Boolean |
Specifies if the returned emails must be deleted after being retrieved or not. |
false |
|
Page Size |
Number |
Size of the page used by the PagingProvider implementation for fetching the emails from the IMAP server |
10 |
|
Limit |
Number |
Maximum amount of emails retrieved by the operation. Take into account that this limit only applies to the emails effectively |
-1 |
|
Streaming Strategy |
Configure if repeatable streams should be used and their behaviour |
|
||
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Array of Message of [Stored Email Content] payload and [IMAP Email Attributes] attributes |
For Configurations.
Mark As Deleted
Marks an incoming email as DELETED, this way the marked email(s) are scheduled for deletion when the folder closes, this means that the email is not physically eliminated from the mailbox folder, but it's state changes.
All DELETED marked emails are going to be eliminated from the mailbox when one of IMAPOperations#expungeFolder(MailboxConnection, String) or IMAPOperations#delete(MailboxConnection, String, long) is executed.
This operation targets a single email.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Mailbox Folder |
String |
Mailbox folder where the emails are going to be marked as deleted |
INBOX |
|
Email ID |
Number |
Email ID Number of the email to mark as deleted. |
x |
For Configurations.
Throws
-
EMAIL:RETRY_EXHAUSTED
-
EMAIL:ACCESSING_FOLDER
-
EMAIL:EMAIL_NOT_FOUND
-
EMAIL:CONNECTIVITY
Mark As Read
Marks a single email as READ changing it's state in the specified mailbox folder.
This operation can targets a single email.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Mailbox Folder |
String |
Folder where the emails are going to be marked as read |
INBOX |
|
Email ID |
Number |
Email ID Number of the email to mark as read. |
x |
For Configurations.
Throws
-
EMAIL:RETRY_EXHAUSTED
-
EMAIL:ACCESSING_FOLDER
-
EMAIL:EMAIL_NOT_FOUND
-
EMAIL:CONNECTIVITY
List - POP3
List all the emails (with pagination) in the configured pop3 mailBoxFolder that match with the specified pop3Matcher criteria.
As the POP3 protocol does not support the capability to find specific emails from its UID in a folder to move/delete it. a parameter deleteAfterRetrieve is available for deleting the emails from the server right after being retrieved. retrieved by the operation (the ones which matched the IMAPEmailPredicateBuilder criteria) and doesn't imply any restriction over the amount of emails being retrieved from the mailbox server.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Mailbox Folder |
String |
Mailbox folder where the emails are going to be fetched |
INBOX |
|
Match with |
Email Matcher which gives the capability of filter the retrieved emails |
|
||
Delete After Retrieve |
Boolean |
Specifies if the returned emails must be deleted after being retrieved or not. |
false |
|
Page Size |
Number |
Size of the page used by the PagingProvider implementation for fetching the emails from the POP3 server |
10 |
|
Limit |
Number |
Maximum amount of emails retrieved by the operation. Take into account that this limit only applies to the emails effectively |
-1 |
|
Streaming Strategy |
Configure if repeatable streams should be used and their behaviour |
|
||
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Array of Message of [Stored Email Content] payload and [POP3 Email Attributes] attributes |
For Configurations.
Send
Sends an email message. The message will be sent to all recipient toAddresses, ccAddresses, bccAddresses specified in the message.
The content of the message aims to be some type of text (text/plan, text/html) and its composed by the body and it's content type. If no content is specified then the incoming payload it's going to be converted into plain text if possible.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
From Address |
String |
The "From" sender address. The person that is going to send the messages, if not set, it defaults to the from address specified in the config. |
|
|
To Addresses |
Array of String |
The recipient addresses of "To" (primary) type. |
x |
|
Cc Addresses |
Array of String |
The recipient addresses of "Cc" (carbon copy) type |
|
|
Bcc Addresses |
Array of String |
The recipient addresses of "Bcc" (blind carbon copy) type |
|
|
Reply To Addresses |
Array of String |
The email addresses to which this email should be replied. |
|
|
Subject |
String |
The subject of the email. |
[No Subject] |
|
Headers |
Object |
The headers that this email carry. |
|
|
Content |
Binary |
Text body of the message. Aims to be text in any format |
#[payload] |
|
ContentType |
String |
ContentType of the body text. Example: "text/plain". |
|
|
Encoding |
String |
The character encoding of the body. If it is configured, it overrides the one inferred from the body. |
|
|
Content Transfer Encoding |
String |
Encoding used to indicate the type of transformation that has been used in order to represent the body in an acceptable manner for transport. The value is case insensitive. Known encodings:
|
Base64 |
|
Attachments |
Object |
The attachments for an Email, that will be sent along the email body. |
|
|
Content Transfer Encoding |
String |
Encoding used to indicate the type of transformation that has been used in order to represent the body in an acceptable manner for transport. The value is case insensitive. Known encodings:
|
Base64 |
|
For Configurations.
Throws
-
EMAIL:RETRY_EXHAUSTED
-
EMAIL:ATTACHMENT
-
EMAIL:CONNECTIVITY
Types
Reconnect
Field | Type | Default Value |
---|---|---|
Frequency |
Number |
|
Count |
Number |
|
Blocking |
Boolean |
Reconnect Forever
Field | Type | Default Value |
---|---|---|
Frequency |
Number |
Pooling Profile
Field | Type | Default Value |
---|---|---|
Max Active |
Number |
|
Max Idle |
Number |
|
Max Wait |
Number |
|
Min Eviction Millis |
Number |
|
Eviction Check Interval Millis |
Number |
|
Exhausted Action |
Enumeration, one of:
|
|
Initialisation Policy |
Enumeration, one of:
|
|
Disabled |
Boolean |
Tls
Field | Type | Default Value |
---|---|---|
Enabled Protocols |
String |
|
Enabled Cipher Suites |
String |
|
Trust Store |
||
Key Store |
Trust Store
Field | Type | Default Value |
---|---|---|
Path |
String |
|
Password |
String |
|
Type |
|
|
Algorithm |
String |
|
Insecure |
Boolean |
Key Store
Field | Type | Default Value |
---|---|---|
Path |
String |
|
Type |
|
|
Alias |
String |
|
Key Password |
String |
|
Password |
String |
|
Algorithm |
String |
Stored Email Content
Field | Type | Default Value |
---|---|---|
Attachments |
Object |
|
Body |
String |
IMAP Email Attributes
Field | Type | Default Value |
---|---|---|
Bcc Addresses |
Array of String |
|
Cc Addresses |
Array of String |
|
Flags |
||
From Addresses |
Array of String |
|
Headers |
Object |
|
Id |
Number |
|
Number |
Number |
|
Received Date |
DateTime |
|
Reply To Addresses |
Array of String |
|
Sent Date |
DateTime |
|
Subject |
String |
|
To Addresses |
Array of String |
Email Flags
Field | Type | Default Value |
---|---|---|
Answered |
Boolean |
|
Deleted |
Boolean |
|
Draft |
Boolean |
|
Recent |
Boolean |
|
Seen |
Boolean |
Imap Matcher
Field | Type | Default Value |
---|---|---|
Seen |
Enumeration, one of:
|
INCLUDE |
Answered |
Enumeration, one of:
|
INCLUDE |
Deleted |
Enumeration, one of:
|
INCLUDE |
Recent |
Enumeration, one of:
|
INCLUDE |
Received Since |
DateTime |
|
Received Until |
DateTime |
|
Sent Since |
DateTime |
|
Sent Until |
DateTime |
|
Subject Regex |
String |
|
From Regex |
String |
Repeatable In Memory Iterable
Field | Type | Default Value |
---|---|---|
Initial Buffer Size |
Number |
|
Buffer Size Increment |
Number |
|
Max Buffer Size |
Number |
Repeatable File Store Iterable
Field | Type | Default Value |
---|---|---|
Max In Memory Size |
Number |
|
Buffer Unit |
Enumeration, one of:
|
POP3 Email Attributes
Field | Type | Default Value |
---|---|---|
Bcc Addresses |
Array of String |
|
Cc Addresses |
Array of String |
|
From Addresses |
Array of String |
|
Headers |
Object |
|
Id |
Number |
|
Number |
Number |
|
Received Date |
DateTime |
|
Reply To Addresses |
Array of String |
|
Sent Date |
DateTime |
|
Subject |
String |
|
To Addresses |
Array of String |
Pop3 Matcher
Field | Type | Default Value |
---|---|---|
Received Since |
DateTime |
|
Received Until |
DateTime |
|
Sent Since |
DateTime |
|
Sent Until |
DateTime |
|
Subject Regex |
String |
|
From Regex |
String |