Description:
This processor is used to get messages from email server using IMAP (Internet Message Access Protocol). A copy of each received email is written into the local drive.
Tags
Download, email, attachment, IMAP, and message.
Properties
In the following list, the required properties are in bold and the other properties are considered as optional. The table also indicates any default values.
Name |
Default value |
Allowable values |
Description |
Host Name | Network address of email server. (e.g:imap.gmail.com) </br> Supports expression language: true | ||
Port | 993 | IMAP port used for authentication and authorization with email server. </br> Supports expression language: true | |
User name | User name used for authentication and authorization with email server. (e.g: ) </br> Supports expression language: true | ||
Password | Password used for authentication and authorization with email server. </br> Supports expression language: true | ||
Folder | INBOX | Email folder to retrieve messages from (e.g: inbox). </br> Supports expression language: true | |
Delimiter | If the delimiter is specified, the message content before the delimiter is extracted. Otherwise, all message content will be extracted.</br>Supports expression language: false | ||
Fetch Size | 5 | Specifies the maximum number of messages to fetch per call to email server. Default value is 5 and the maximum value is 10.</br> Supports expression language: false | |
Destination | flowfile-attribute | flowfile-attribute flowfile-content | Indicates whether the results of the JsonPath evaluation are written to the flow file content or a flow file attribute. If set to flow file content, the e-mail body content written on flow file content. Supports expression language: false |
Output Type | Text | Text Html | Indicates the type of email message content. If set to HTML, the message content is converted into HTML format. Otherwise, the message is printed in plain text format. Supports expression language: false |
Relationships
Name |
Description |
failure | Failed to get messages from email server for some reasons are transferred to this relationship. |
success | All messages that are successfully received from email server is routed to this relationship. |
Read Attributes
None specified.
Writes Attributes
None specified.
How to get data using ExtractEmail in Data Integration Platform?
The following is the overview template to get data using ExtractEmail and store the response in a file.
Step 1: Drag and drop the ExtractEmail processor into the canvas. Double click the processor to configure it.
For example, if you want to get unread mails in inbox from your Gmail account and store it into a file, configure with your user, hostname, and port number details.
Set Destination as flowfile content to get messages as flowfile content.
Step 2: Drag and drop the PutFile processor. Double click to configure the processor and enter the directory in which the response should be stored as follows,