Email Connector Reference 1.7 | MuleSoft Documentation
# Email Connector Reference 1.7
Support Category: Select
Anypoint Connector for Email (Email Connector ) is used to list and send emails and perform operations in different mailboxes, such as `delete` and `mark as read`.
Email Connector supports the SMTP, SMTPS, IMAP, IMAPS, POP3, and POP3s protocols.
## Configurations
### IMAP
Configuration for operations that are performed through the IMAP (Internet Message Access Protocol) protocol.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Name for this configuration. Connectors reference the configuration with this name.  
**Connection** | 
  * IMAP Connection
  * IMAPS Connection

|  Connection types for this configuration  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Eagerly Fetch Content** |  Indicates whether to open and read the retrieved emails. The default value is "true".  
**Expiration Policy** |  Expiration Policy |  Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances when as appropriate.  
### Connection Types
### IMAP Connection
A connection provider that returns instances of IMAP-based mailbox connections.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Properties** |  An additional set of custom properties to configure the connection session  
**Timeout Unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A Time Unit that qualifies the `connectionTimeout`, `writeTimeout` and `readTimeout` attributes  
**Connection Timeout** |  The socket connection timeout value. This attribute works in tandem with `timeoutUnit`.  
**Read Timeout** |  The socket read timeout value. This attribute works in tandem with `timeoutUnit`.  
**Write Timeout** |  The socket write timeout value. This attribute works in tandem with `timeoutUnit`.  
Host name of the mail server. |  If the Host name value is defined with a property name and the value is empty, then it defaults to the localhost value.  
Username used to connect with the mail server.  
Username password to connect with the mail server.  
The port number of the mail server.  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool  
### IMAPS Connection
A connection provider that returns instances of IMAPs (secure) based mailbox connections.
The returned connection is secured by TLS.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Properties** |  An additional set of custom properties to configure the connection session.  
**Timeout Unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A time unit that qualifies the `connectionTimeout`, `writeTimeout` and `readTimeout` attributes.  
**Connection Timeout** |  The socket connection timeout value. This attribute works in tandem with `timeoutUnit`.  
**Read Timeout** |  The socket read timeout value. This attribute works in tandem with #timeoutUnit.  
**Write Timeout** |  The socket write timeout value. This attribute works in tandem with #timeoutUnit  
Host name of the mail server |  If the Host name value is defined with a property name and the value is empty, then it defaults to the localhost value.  
Username used to connect with the mail server  
Username password to connect with the mail server  
The port number of the mail server  
**TLS Configuration** |  TLS Configuration for the secure connection of the IMAPS protocol  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool  
## Operations
  * Expunge Folder
  *   * Mark As Deleted
  *   * Move To Folder


### Associated Sources
  * On New Email - IMAP


### POP3
Configuration for operations that are performed through the POP3 (Post Office Protocol 3) protocol.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Name for this configuration. Connectors reference the configuration with this name.  
**Connection** | 
  * POP3 Connection
  * POP3S Connection

|  Connection types for this configuration  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Expiration Policy** |  Expiration Policy |  Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances when appropriate.  
### Connection Types
#### POP3 Connection
A connection provider that returns instances of POP-based mailbox connections.
##### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Properties** |  An additional set of custom properties to configure the connection session  
**Timeout Unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A time unit that qualifies the `connectionTimeout`, `writeTimeout` and `readTimeout` attributes.  
**Connection Timeout** |  The socket connection timeout value. This attribute works in tandem with `timeoutUnit`.  
**Read Timeout** |  The socket `read` timeout value. This attribute works in tandem with `timeoutUnit`.  
**Write Timeout** |  The socket `write` timeout value. This attribute works in tandem with `timeoutUnit`.  
Host name of the mail server. |  If the Host name value is defined with a property name and the value is empty, then it defaults to the localhost value.  
Username used to connect with the mail server.  
Username password to connect with the mail server.  
The port number of the mail server.  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool  
##### POP3S Connection
A connection provider that returns instances of POP3s (secured) based mailbox connections. The returned connection is secured by TLS.
###### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Properties** |  An additional set of custom properties to configure the connection session  
**Timeout Unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A TimeUnit which qualifies the `connectionTimeout`, `writeTimeout` and `readTimeout` attributes.  
**Connection Timeout** |  The socket connection timeout value. This attribute works in tandem with `timeoutUnit`.  
**Read Timeout** |  The socket read timeout value. This attribute works in tandem with `timeoutUnit`.  
**Write Timeout** |  The socket write timeout value. This attribute works in tandem with `timeoutUnit`.  
Host name of the mail server |  If the Host name value is defined with a property name and the value is empty, then it defaults to the localhost value.  
Username used to connect with the mail server  
Username password to connect with the mail server  
The port number of the mail server  
**TLS Configuration** |  TLS configuration for the secure connection of the POP3S protocol  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool  
### Supported Operations
  * 

#### Associated Sources
  * On New Email - POP3


### SMTP
Configuration for operations that are performed through the SMTP (Simple Mail Transfer Protocol) protocol.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Name for this configuration. Connectors reference the configuration with this name.  
**Connection** | 
  * SMTP Connection
  * SMTPS Connection
#### Associated Sources
  * On New Email - POP3


### SMTP
Configuration for operations that are performed through the SMTP (Simple Mail Transfer Protocol) protocol.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Name for this configuration. Connectors reference the configuration with this name.  
**Connection** | 
  * SMTP Connection
  * SMTPS Connection

|  Connection types for this configuration.  
The "From" address of the message sender  
**Default Encoding** |  Default character encoding to use in all the messages. If not specified, the default charset in the Mule configuration is used.  
**Default Content Transfer Encoding**  
**Expiration Policy** |  Expiration Policy |  Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances when appropriate.  
#### Connection Types
##### SMTP Connection
A connection provider that returns instances of SMTP-based sender connections.
###### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Properties** |  An additional set of custom properties to configure the connection session  
**Timeout Unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A TimeUnit that qualifies the `connectionTimeout`, `writeTimeout` and `readTimeout` attributes.  
**Connection Timeout** |  The socket connection timeout value. This attribute works in tandem with `timeoutUnit`.  
**Read Timeout** |  The socket read timeout value. This attribute works in tandem with `timeoutUnit`.  
**Write Timeout** |  The socket write timeout value. This attribute works in tandem with `timeoutUnit`.  
Host name of the mail server. |  If the Host name value is defined with a property name and the value is empty, then it defaults to the localhost value.  
Username used to connect with the mail server.  
Username password to connect with the mail server.  
The port number of the mail server.  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool  
##### SMTPS Connection
A connection provider that returns instances of SMTPS-based mailbox connections. The returned connection is secured by TLS.
###### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Properties** |  An additional set of custom properties to configure the connection session  
**Timeout Unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A TimeUnit which qualifies the `connectionTimeout`, `writeTimeout` and `readTimeout` attributes.  
**Connection Timeout** |  The socket connection timeout value. This attribute works in tandem with `timeoutUnit`.  
**Read Timeout** |  The socket read timeout value. This attribute works in tandem with `timeoutUnit`.  
**Write Timeout** |  The socket write timeout value. This attribute works in tandem with `timeoutUnit`.  
Host name of the mail server. |  If the Host name value is defined with a property name and the value is empty, then it defaults to the localhost value.  
Username used to connect with the mail server.  
Username password to connect with the mail server.  
The port number of the mail server.  
**TLS Configuration** |  TLS Configuration for the secure connection of the SMTPS protocol  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool  
### Supported Operations
### Count messages - IMAP
`<email:count-messages-imap>`
Counts the emails in the mailboxFolder.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Mailbox Folder | Mailbox folder where the emails are.  
Count Filter |  Enumeration, one of:
  * DELETED
  * UNREAD

| Count only messages specified with this option.  
Target Variable | Name of a variable to store the operation’s output.  
Target Value | An expression that evaluates the operation’s output. The expression outcome is stored in the **Target Variable** | `#[payload]`  
Reconnection Strategy | 
  *   * Reconnect Forever

| Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### For Configurations.
#### Throws
  * EMAIL:EMAIL_COUNT_MESSAGES
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### Delete
`<email:delete>`
Deletes the email with the specified email ID from the mailbox.
For IMAP mailboxes, all the messages scheduled for deletion (marked as `DELETED`) are also erased from the folder.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
**Mailbox Folder** |  Mailbox folder from which to delete the emails  
Email ID number of the email to delete  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
### For Configurations
#### Throws
  * EMAIL:EMAIL_NOT_FOUND
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### Expunge Folder
`<email:expunge-folder>`
Deletes all the messages scheduled for deletion with the `DELETED` flag set from the mailbox.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
**Mailbox Folder** |  Mailbox folder where the emails with the `DELETED` flag are scheduled to be permanently deleted  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
### For Configurations
#### Throws
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### List - IMAP
`<email:list-imap>`
List all the emails (with pagination) in the configured IMAP mailbox folder that matches with the specified IMAP matcher criteria.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use..  
**Mailbox Folder** |  Mailbox folder from which to fetch the emails  
**Match with** |  |  Email Matcher that gives the capability of filtering the retrieved emails  
**Delete After Retrieve** |  Specifies whether to delete the returned emails after they are retrieved  
Size of the page used by the Paging Provider implementation for fetching the emails from the IMAP server  
**Pagination Offset** |  Size of the pagination offset used by the paging provider implementation for fetching the emails from the IMAP server.  
Maximum number of emails retrieved by the operation. Take into account that this limit applies only to the emails effectively retrieved by the operation (the emails that match the IMAPEmailPredicateBuilder criteria) and doesn’t imply any restrictions for the amount of emails that are retrieved from the mailbox server.  
**Streaming Strategy** | 
  * Repeatable in Memory Iterable
  * Repeatable File Store Iterable
  * non-repeatable-iterable

|  Configure how Mule processes streams with streaming strategies. Repeatable streams are the default behavior.  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Target Variable** |  The name of a variable to store the operation’s output  
**Target Value** |  An expression that evaluates the operation’s output. The expression outcome is stored in the **Target Variable**  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### Output
Array of Message of [Stored Email Content] payload and [IMAP Email Attributes] attributes  
---  
### For Configurations
#### Throws
  * EMAIL:EMAIL_LIST
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
|  Configure how Mule processes streams with streaming strategies. Repeatable streams are the default behavior.  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Target Variable** |  The name of a variable to store the operation’s output  
**Target Value** |  An expression that evaluates the operation’s output. The expression outcome is stored in the **Target Variable**  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### Output
Array of Message of [Stored Email Content] payload and [IMAP Email Attributes] attributes  
---  
### For Configurations
#### Throws
  * EMAIL:EMAIL_LIST
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY


### Mark As Deleted
`<email:mark-as-deleted>`
Marks an incoming email as `DELETED`. Emails that are marked for deletion are scheduled for deletion when the folder closes, which means that the email is not physically eliminated from the mailbox folder, but its state changes. All emails that are marked as `DELETED` are eliminated from the mailbox when `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** |  Name of the configuration to use..  
**Mailbox Folder** |  Mailbox folder where the emails are going to be marked as deleted  
Email ID number of the email to mark as deleted.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
### For Configurations
#### Throws
  * EMAIL:EMAIL_NOT_FOUND
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### Mark As Read
`<email:mark-as-read>`
Marks a single email as `READ` changing its state in the specified mailbox folder. This operation can target a single email.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
**Mailbox Folder** |  Folder where the emails are going to be marked as read  
Email ID number of the email to mark as read.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
### For Configurations
  * IMAP ==== Throws
  * EMAIL:EMAIL_NOT_FOUND
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### Move To Folder
`<email:move-to-folder>` Moves the email with ID `emailId` from the source folder to the target folder.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
**Source Folder** |  Source mailbox folder where emails to move are located.  
**Target Folder** |  Target mailbox folder where emails are moved.  
Email ID number of the email to move.  
**Create Target Folder** |  Creates the target folder if the folder does not exist.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
### For Configurations
#### Throws
  * EMAIL:EMAIL_NOT_FOUND
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### Count messages - POP3
`<email:count-messages-pop3>`
Counts the emails in the INBOX_FOLDER.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Target Variable | The name of a variable to store the operation’s output  
Target Value | An expression that evaluates the operation’s output. The expression outcome is stored in the **Target Variable** | `#[payload]`  
Reconnection Strategy | 
  *   * Reconnect Forever

| Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### For Configurations.
#### Throws
  * EMAIL:EMAIL_COUNT_MESSAGES
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


### List - POP3
`<email:list-pop3>`
Lists all the emails (with pagination) in the configured POP3 mailbox folder that matches the specified POP3 Matcher criteria. The POP3 protocol does not support finding a specific email from its UID in a folder to move or delete it, so a `deleteAfterRetrieve` parameter is available for deleting the emails from the server immediately after retrieval.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use..  
**Mailbox Folder** |  Mailbox folder from which to fetch the emails  
**Match with** |  |  Email Matcher that gives the capability of filtering the retrieved emails  
**Delete After Retrieve** |  Specifies whether to delete the returned emails after they are retrieved  
Size of the page used by the Paging Provider implementation for fetching the emails from the POP3 server  
**Pagination Offset** |  Size of the pagination offset used by the paging provider implementation for fetching the emails from the POP3 server.  
Maximum number of emails retrieved by the operation. Take into account that this limit applies only to the emails effectively retrieved by the operation (the emails that matched the `IMAPEmailPredicateBuilder` criteria) and doesn’t imply any restriction over the number of emails that are retrieved from the mailbox server.  
**Streaming Strategy** | 
  * Repeatable in Memory Iterable
  * Repeatable File Store Iterable
  * non-repeatable-iterable

|  Configure to use repeatable streams.  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Target Variable** |  The name of a variable to store the operation’s output.  
**Target Value** |  An expression that evaluates the operation’s output. The expression outcome is stored in the **Target Variable**  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### Output
Array of Message of [Stored Email Content] payload and [POP3 Email Attributes] attributes  
---  
### For Configurations
#### Throws
  * EMAIL:EMAIL_LIST
  * EMAIL:ACCESSING_FOLDER
  * EMAIL:CONNECTIVITY


### Send
`<email:send>`
This operation sends an email message. The message is sent to all recipient (`To`, `CC`, and `BCC`) addresses specified in the message. The content of the message is some type of text (`text/plain`, `text/html`) and is composed of the body and its content type. If no content is specified then the incoming payload is converted into plain text if possible.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
**From Address** |  The "From" address of the message sender. 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  
**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 to reply to this email  
The subject of the email  
The headers that this email carries  
Text body of the message, which can be in any format  
**ContentType** |  Content Type of the body text. Example: "text/plain"  
The character encoding of the body. If it is configured, it overrides the one inferred from the body.  
**Attachments** |  The attachments that are sent along with the email body  
**Content Transfer Encoding** |  Encoding used to indicate the type of transformation that is used to represent the body in an acceptable manner for transport. The value is case insensitive. Known encodings: BASE64, QUOTED-PRINTABLE, 8BIT, 7BIT, BINARY  
**Reconnection Strategy** | 
  *   * Reconnect Forever
|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
### For Configurations
#### Throws
  * EMAIL:SEND
  * EMAIL:CONNECTIVITY
  * EMAIL:RETRY_EXHAUSTED


## Sources
### On New Email - IMAP
`<email:listener-imap>`
Retrieves all the emails from an IMAP mailbox folder, watermark can be enabled for polled items.
Note that Email Connector currently doesn’t support multipart/signed (digitally signed) emails, and they are not processed by **On New Email** listeners.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use..  
The name of the folder to poll emails from.  
**Delete After Retrieve** |  Specifies whether to delete the returned emails after they are retrieved  
**Enable Watermark** |  Specifies wether to apply watermark to the polled emails.  
**Imap Matcher** |  |  A matcher to filter emails retrieved by this polling source. By default, already-read emails will be filtered.  
**Enable Remote Search** |  If search filters should be resolved on the server side, set this value to `true`. The default is `false`, which means search filters are resolved on the client side. This is because some email servers are not fully compliant with `rfc-3501` search terms. Activating this feature diminishes traffic by reducing the number of emails sent to the client side for processing.  
**Primary Node Only** |  Whether to execute this source on the primary node only when running in cluster mode  
**Scheduling Strategy** |  scheduling-strategy |  Configures the scheduler that triggers the polling  
**Redelivery Policy** |  Redelivery Policy |  Defines a policy for processing the redelivery of the same message  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### Output
Stored Email Content  
---  
Attributes Type |  Base Email Attributes  
### For Configurations
### On New Email - POP3
`<email:listener-pop3>`
Retrieves all the emails from an POP3 mailbox folder.
Note that Email Connector currently doesn’t support multipart/signed (digitally signed) emails, and they are not processed by **On New Email** listeners.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The name of the folder to poll emails from  
**Delete After Retrieve** |  Specifies whether to delete the returned emails after they are retrieved  
**Pop3 Matcher** |  |  A matcher to filter emails retrieved by this polling source  
**Primary Node Only** |  Whether to execute this source on the primary node only when running in cluster mode  
**Scheduling Strategy** |  scheduling-strategy |  Configures the scheduler that triggers the polling  
**Redelivery Policy** |  Redelivery Policy |  Defines a policy for processing the redelivery of the same message  
**Attachment Naming Strategy** |  Enumeration, one of:
  * NAME_HEADERS
  * NAME_HEADERS_SUBJECT

|  Enables you to specify a strategy for how to name attachments  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.  
#### Output
Stored Email Content  
---  
Attributes Type |  Base Email Attributes  
### For Configurations
### Reconnection
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Fails Deployment** |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  The reconnection strategy to use  
### Reconnect
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Frequency | How often in milliseconds to reconnect.  
How many reconnection attempts to make.  
blocking | If false, the reconnection strategy runs in a separate, non-blocking thread.  
### Reconnect Forever
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Frequency | How often in milliseconds to reconnect.  
blocking | If false, the reconnection strategy runs in a separate, non-blocking thread.  
### Pooling Profile
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Active** |  Controls the maximum number of Mule components that can be borrowed from a session at one time. When set to a negative value, there is no limit to the number of components that can be active at one time. When maxActive is exceeded, the pool is said to be exhausted.  
Controls the maximum number of Mule components that can sit idle in the pool at any time. When set to a negative value, there is no limit to the number of Mule components that can be idle at one time.  
Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the exhaustedAction is set to `WHEN_EXHAUSTED_WAIT`.  
**Min Eviction Millis** |  Determines the minimum amount of time an object can sit idle in the pool before it is eligible for eviction. When the value is a negative number, no objects are evicted from the pool due to idle time alone.  
**Eviction Check Interval Millis** |  Specifies the number of milliseconds between runs of the object evictor. When this value is set to a negative number, no object evictor is executed.  
**Exhausted Action** |  Enumeration, one of:
  * WHEN_EXHAUSTED_GROW
  * WHEN_EXHAUSTED_WAIT
  * WHEN_EXHAUSTED_FAIL

|  Specifies the behavior of the Mule component pool when the pool is exhausted. Possible values are: `WHEN_EXHAUSTED_FAIL`, which will throw a `NoSuchElementException`, `WHEN_EXHAUSTED_WAIT`, which will block by invoking `Object.wait(long)` until a new or idle object is available, or `WHEN_EXHAUSTED_GROW`, which will create a new Mule instance and return it, essentially making `maxActive` meaningless. If a positive `maxWait` value is supplied, it will block for, at most, that many milliseconds, after which a `NoSuchElementException` is thrown. If `maxThreadWait` is a negative value, it blocks indefinitely.  
**Initialisation Policy** |  Enumeration, one of:
  * INITIALISE_NONE
  * INITIALISE_ONE
  * INITIALISE_ALL

|  Determines how components in a pool should be initialized. The possible values are: `INITIALISE_NONE` (loads no components into the pool on startup), `INITIALISE_ONE` (loads one initial component into the pool on startup), or `INITIALISE_ALL` (loads all components in the pool on startup)  
Whether pooling should be disabled  
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Enabled Protocols** |  A comma-separated list of protocols enabled for this context  
**Enabled Cipher Suites** |  A comma-separated list of cipher suites enabled for this context  
**Trust Store**  
**Revocation Check** | 
  * Standard Revocation Check
  * Custom OCSP Responder
|  Determines how components in a pool should be initialized. The possible values are: `INITIALISE_NONE` (loads no components into the pool on startup), `INITIALISE_ONE` (loads one initial component into the pool on startup), or `INITIALISE_ALL` (loads all components in the pool on startup)  
Whether pooling should be disabled  
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Enabled Protocols** |  A comma-separated list of protocols enabled for this context  
**Enabled Cipher Suites** |  A comma-separated list of cipher suites enabled for this context  
**Trust Store**  
**Revocation Check** | 
  * Standard Revocation Check
  * Custom OCSP Responder

  
### Trust Store
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
The location (which will be resolved relative to the current classpath and file system, if possible) of the trust store  
The password used to protect the trust store  
The type of store used  
The algorithm used by the trust store  
If `true`, no certificate validations are performed, which makes connections vulnerable to attacks. Use at your own risk.  
### Key Store
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
The location (which is resolved relative to the current classpath and file system, if possible) of the key store  
The type of store used  
When the key store contains many private keys, this attribute indicates the alias of the key that should be used. If not defined, the first key in the file will be used by default.  
**Key Password** |  The password used to protect the private key  
The password used to protect the key store  
The algorithm used by the key store  
### Standard Revocation Check
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Only End Entities** |  Verify only the last element of the certificate chain  
**Prefer Crls** |  Try CRL instead of OCSP first  
**No Fallback** |  Do not use the secondary checking method (the one not selected before)  
Avoid verification failure when the revocation server cannot be reached or is busy  
### Custom OCSP Responder
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
The URL of the OCSP responder  
**Cert Alias** |  Alias of the signing certificate for the OCSP response (must be in the trust store), if present  
### CRL File
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
The path to the CRL file.  
### Expiration Policy
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Idle Time** |  A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration  
Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A time unit that qualifies the maxIdleTime attribute  
### Stored Email Content
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
### Base Email Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**From Addresses** |  Array of String  
**To Addresses** |  Array of String  
**Cc Addresses** |  Array of String  
**Bcc Addresses** |  Array of String  
**Reply To Addresses** |  Array of String  
**Received Date**  
### IMAP Matcher
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Enumeration, one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Indicates whether to retrieve 'seen' or 'not seen' emails  
Enumeration, one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Indicates whether to retrieve 'answered' or 'not answered' emails  
Enumeration, one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Indicates whether to retrieve 'marked as deleted' or 'not marked as deleted' emails  
Enumeration, one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Indicates whether to retrieve `recent` or `not recent` emails  
**Received Since** |  Indicates the date after which to retrieve received emails  
**Received Until** |  Indicates the date until which to retrieve the received emails  
**Sent Since** |  Indicates the date after which to retrieve sent emails  
**Sent Until** |  Indicates the date until which to retrieve sent emails  
**Subject Regex** |  Subject Regex to match with the wanted emails  
**From Regex** |  From Email Address Regex to match with the wanted emails  
### Redelivery Policy
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Redelivery Count** |  The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message  
**Use Secure Hash** |  Whether to use a secure hash algorithm to identify a redelivered message  
**Message Digest Algorithm** |  The secure hashing algorithm to use. If not set, the default is `SHA-256`.  
**Id Expression** |  Defines one or more expressions to use to determine when a message has been redelivered. This property can be set only if **Use secure hash** is `false`.  
**Object Store** |  Object Store |  The object store in which to store the redelivery counter for each message.  
### IMAP Email Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**From Addresses** |  Array of String  
**To Addresses** |  Array of String  
**Cc Addresses** |  Array of String  
**Bcc Addresses** |  Array of String  
**Reply To Addresses** |  Array of String  
**Received Date**  
### Email Flags
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
### Repeatable in Memory Iterable
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Initial Buffer Size** |  The number of instances that are initially allowed to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize. Default value is 100 instances.  
**Buffer Size Increment** |  This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. Default value is 100 instances.  
**Max Buffer Size** |  The maximum amount of memory to use. If more than that is used then a `STREAM_MAXIMUM_SIZE_EXCEEDED` error is raised. A value lower than or equal to zero means no limit.  
### Repeatable File Store Iterable
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**In Memory Objects** |  The maximum amount of instances that will be kept in memory. If more than that is required, content starts to buffer on disk.  
**Buffer Unit** |  Enumeration, one of: |  The unit in which maxInMemorySize is expressed  
### POP3 Matcher
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Received Since** |  Indicates since which date the received emails must be retrieved  
**Received Until** |  Indicates until which date the received emails must be retrieved  
**Sent Since** |  Indicates since which date the sent emails must be retrieved  
**Sent Until** |  Indicates until which date the sent emails must be retrieved  
**Subject Regex** |  Subject Regex to match with the wanted emails  
**From Regex** |  From Email Address Regex to match with the wanted emails  
### POP3 Email Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**From Addresses** |  Array of String  
**To Addresses** |  Array of String  
**Cc Addresses** |  Array of String  
**Bcc Addresses** |  Array of String  
**Reply To Addresses** |  Array of String  
**Received Date**  
## See Also
  * Email Connector Release Notes
  *