Inbound Email component
The Inbound Email component can be used to retrieve email messages or attachments from an inbox. After retrieving such messages or attachments, they are sent to the next component in the flow.
Configuration
This component has the following configuration options:
- Protocol
- Host
- Port
- Authentication Type
- Username
- Password
- Access Token
- Content
- Unseen
- Polling Interval
- Search Subject
- Search Body
- Search From
- Search To
Protocol
Options
imap
imaps
pop3
pop3s
smtp
smtps
Description
The protocol that is used to connect to the email server.
Host
Description
The hostname of the email server.
Port
Description
The port of the email server.
Authentication Type
Options
Basic
(default)OAuth
Description
The authentication type used to log in to the email server.
Username
Description
The username or email address used to log in to the email server.
Remarks
- Refers to the email account you want to access when Authentication Type is set to
OAuth
.
Password
Description
The password used to log in to the email server.
Remarks
- Only available when the Authentication Type is set to
Basic
.
Access Token
Description
The access token used for authentication on the email server. Please refer to the SetOAuth2Token component page on how to set up access tokens.
Remarks
- Only available when the Authentication Type is set to
OAuth
.
Content
Options
Message body
Attachments
Message body and attachments
Description
Indicates whether message bodies or attachments should be retrieved. When attachments
are retrieved and an email doesn't have any attachments then the body will be processed
and sent to the next component. A header called noAttachmentsFound
with the value true
will be added to the exchange so you know when this happens. For example: you can
use a simple expression like ${header.noAttachmentsFound} == true
in the
Content Router component to handle this.
When you selected Message body and attachments
both the body and attachments of
an email will be processed. The header isEmailBody
is added with a value of
true
when the body is sent to the next component. Another header
isEmailAttachment
with value of true
is added when an attachment is sent to
the next component. Every time an attachment is processed the email body is also
set on a header called emailBody
.
Each attachment is sent as a single message. The original file name of an attachment
is stored in the header named CamelFileName
.
You can use a Filter to filter in or filter out attachments.
Unseen
Description
Indicates whether only unread messages should be retrieved.
Remark
This option only applies for the IMAP
and IMAPS
protocol.
Polling Interval
Description
The number of milliseconds between each check for new email messages.
Remark
The fewer emails there are present in the mailbox, the faster the reading will be. This applies to both read and unread emails. If you are expecting to 'import' emails big files make sure the polling interval is set to a high enough value.
Search Subject
Description
An optional string that should occur in the subject of emails.
Search Body
Description
An optional string that should occur in the body of emails.
Search From
Description
An optional pattern describing the recipients of emails.
Search to
Description
An optional pattern describing the sender of emails.
Custom SSL Certificates
It can be the case that the mailbox you are trying to reach uses an SSL Certificate (IMAPS
/ POP3S
), this is not a problem for Dovetail as long as it is signed by a default trusted certificate authority.
When the mailbox uses a self-signed
certificate, or a certificate not signed by a default trusted certificate authority, the certificate should be retrieved and imported into Dovetail. Unfortunately to date, this has to be done manually by the support staff of Dovetail, please contact your Dovetail provider when necessary.
Remarks
- The JavaMail API is used to search for email messages. According to its documentation, the search capabilities depend on the protocol, provider, and server in use. In general, all of the string patterns supported by search terms are just simple strings; no regular expressions are supported.