Inbound Email component
The Inbound Email component is used to retrieve email messages and/or attachments from an email server. After retrieving messages and/or attachments, they are sent to the next component in the flow.
Configuration
This component has the following configuration options:
Protocol
Specifies the protocol used to connect to the email server.
Options
imap
(default)imaps
pop3
pop3s
smtp
smtps
Host
Defines the hostname of the email server.
If the mail server you are connecting to uses an SSL Certificate, it should work out of the box as long as it is signed by a default trusted certificate authority. If the mail server uses a self-signed
certificate or a certificate not signed by a default trusted certificate authority, it must be imported manually. Please contact your Dovetail provider for support.
Port
Defines the port of the email server.
Authentication Type
Specifies the authentication type used to log in to the email server.
Options
Basic
(default)OAuth
Username
Defines the username or email account used to log in to the email server.
This refers to the email account you want to access when Authentication Type is set to OAuth
.
Password
Defines the password used to log in to the email server.
Only available when the Authentication Type is set to Basic
.
Access Token
Defines the access token used for authentication on the email server.
Only available when the Authentication Type is set to OAuth
.
- Use the
@{tenantVariableName}
syntax to retrieve the access token from the Tenant Variables. - Refer to the SetOAuth2Token component page on how to set up access tokens.
Content
Specifies whether the message body and/or attachments should be retrieved, put on the body and sent to the next component.
Options
Message body
(default)Attachments
Message body and attachments
No attachments
If you attempt to retrieve attachments from an email that does not have any, the body is processed and sent to the next component instead. A header named noAttachmentsFound
with the value true
is set to indicate this.
Use a simple expression like ${header.noAttachmentsFound} == true
in a Filter component or Content Router component to handle such cases.
Message body and attachments
If Message body and attachments
is selected, both the email body and it's attachments are retrieved. Additionally:
- A header named
isEmailBody
with the valuetrue
is set when the email body is sent to the next component. - A header named
isEmailAttachment
with the valuetrue
is set when an email attachment is sent to the next component. - Each attachment is sent as a separate message.
- A header named
CamelFileName
is set with the original file name of the attachment. - Every time an attachment is sent to the next component, the email body is set on a header named
emailBody
.
Unseen
Specifies whether only unread messages should be retrieved.
This option only applies to the imap
and imaps
protocol.
An email will not be marked as read if there is a failed exchange shortly after it is retrieved and starts following the flow.
Polling interval (in ms)
Specifies the amount of time (in milliseconds) between each poll for new email messages.
The fewer emails there are present in the mailbox, the faster the reading process will be. Having a large number of read and/or unread emails on the server may create a performance bottleneck. Consider archiving emails to improve performance.
If you expect to retrieve emails with large attachments, ensure the polling interval is long enough to complete the retrieval process before the next poll.
Search subject
Defines (a part of) the email subject, only emails with this text in their subject are retrieved.
Search body
Defines (a part of) the email body, only emails with this text in their body are retrieved.
Search from
Defines the from email address, only emails received from this email address are retrieved.
Search to
Defines the to email address, only emails sent to this email address are retrieved.
The four search terms above only support strings. Regular expressions are not supported.
We use the JavaMail API to search for and retrieve emails. The search capabilities depend on the protocol, provider and server used.