# Email Messages Input

## ![](/files/GBnJWCrXuVm7AbV0jKpJ) Email Messages Input

### Description <a href="#description" id="description"></a>

The Email Messages Input transform allows you to retrieve messages and their attachments from a mail server using the POP3, IMAP or MBOX standard protocols.

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

### Options

#### General

On this tab you will find the general mail server connection settings:

| Option                       | Description                                                                                                                                                                                                                                                  |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Transform name               | Name of the transform.                                                                                                                                                                                                                                       |
| **Mail Server Connection**   |                                                                                                                                                                                                                                                              |
| Mail Connection              | If a mail server connection is selected here, the rest of this tab is ignored. The server configuration will be taken from the [Mail Server Connection](/data-shaper-1.21/knowing-the-data-shaper-designer/index-2/mail-server-connection.md) metadata item. |
| **Server settings**          |                                                                                                                                                                                                                                                              |
| Source host                  | The mail server host                                                                                                                                                                                                                                         |
| Use SSL?                     | Check this option if your server needs an SSL connection                                                                                                                                                                                                     |
| Use XOAUTH2                  | If checked XOAuth2 will be used to authenticate with the server.                                                                                                                                                                                             |
| Username                     | The username of the mailbox to connect to                                                                                                                                                                                                                    |
| Password                     | The password to use                                                                                                                                                                                                                                          |
| Use proxy?                   | Check this option if you want to connect through a proxy.                                                                                                                                                                                                    |
| Proxy username               | The username to connect to the proxy with                                                                                                                                                                                                                    |
| Fetch in batches?            | Enable this option if you want to retrieve larger volumes of mails in batches                                                                                                                                                                                |
| Ignore errors reading fields | Sometimes a server doesn’t support the retrieval of a particular piece of information. Enable this option to ignore these errors.                                                                                                                            |
| Protocol                     | Specify either standard protocol POP3, IMAP or MBOX to retrieve the mails                                                                                                                                                                                    |
| Test Connection button       | This will simply try to connect to the mail server with the specified settings. This button does not retrieve mails.                                                                                                                                         |

#### Settings

**POP3 settings**

| Option                       | Description                                                                 |
| ---------------------------- | --------------------------------------------------------------------------- |
| Retrieve                     | Specify either "All emails" or "Retrieve first…​ emails"                    |
| Retrieve the …​ first emails | Allows you to specify how many mails you want to retrieve at most in one go |

**IMAP settings**

| Option                       | Description                                                                                                                                  |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Get folder from field        | Enable this option to allow the IMAP folder name to be present in an input field of this transform.                                          |
| Folder field                 | The folder field in case the option above is enabled.                                                                                        |
| IMAP folder                  | The IMAP folder to retrieve mails from                                                                                                       |
| Test folder…​ button         | Use this to test if the folder is valid                                                                                                      |
| Open button                  | use this to select the IMAP folder                                                                                                           |
| Include subfolders           | Check this option to also retrieve mails from sub-folders                                                                                    |
| Retrieve                     | Specify which mails to retrieve: Get all, new, old, read, unread, flagged, not flagged, draft, not draft, answered or not answered messages. |
| Retrieve the first …​ emails | Specify how many emails to retrieve at most                                                                                                  |

**Batch settings**

| Option                  | Description                                       |
| ----------------------- | ------------------------------------------------- |
| Batch size              | Number of emails to retrieve at once in one batch |
| Start at message number | The first message number to start retrieving at   |
| End at message number   | The last message number to end retrieving with    |

#### Filters

These are the filters you can set on the header of the mail message. Mail for which the header matches your filter will be retrieved, the rest is ignored.

| Option        | Description   |
| ------------- | ------------- |
| Sender (FROM) | Only retrieve |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/emailinput.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
