# POP3 or IMAP credentials

Data Mover connects to the **POP3** or **IMAP** mail protocols with **Basic Authentication**, **Secret file** or **OAuth2 Authentication**.

To set a new credential for the the **POP3** or **IMAP** protocols, go to **Setup** → **Credentials**, click the **NEW** button and fill in the fields in the **Credential Configuration** form:

* **Name** \*: this is the name of the credential and will appear in the **Client Connection** form → **Authentication type** field.&#x20;
* **Description** \*: this is the description of the credential being created. It will appear in the **Description** column of the **Credentials** page.
* **Credential type** \*: select one option according to your needs:
  * **Basic Auth**: enter the user and password that will be used for the authentication.
  * **Secret file**: not applicable. It is used with Google Cloud Storage credentials.&#x20;
  * **Oauth2 Client Credential**: fill in these fields:
    * **Client Id** \* and **Client secret** \*: they must be provided by the service provider. They authorize the email application identified by the specified email address.
    * **Token Endpoint** \*: it must be provided by the service provider.&#x20;
    * **Scope** (not mandatory): it must be provided by the service provider.

Connection to the server will occur with an IMAP or POP3 client connection, which will be authorized using the credentials configured. See the [Client Connection: POP3 or IMAP](/data-mover-1.21/transfer-protocols-and-connectors/client-connections/client-connection-pop3-or-imap.md) pages for details.&#x20;

The configuration above can be used for example to **send a file received on a VFS to the email address of a recipient**. A **mediation contract** must be designed to send the email to the recipient. In the mediation contract action, the VFS that receives the file must be configured. The workflow associated with the contract has a **mail Push service task**. The variables of the service task are available in the [mail Push](/data-mover-1.21/workflow-templates/service-tasks/triggerable-service-tasks.md#mail-push) section.&#x20;

Another example of the configuration described above is to **automatically send an email to a configured VFS and VFS path**. When an email (with or without attachment) is received on a server email, a **mediation contract** can be designed with an OnDemand trigger that sends the email (and its attachment if existing) to a configured VFS and VFS path. The workflow associated with the mediation contract has a **mail Pull service task**. The variables of the service task are available in the [mail Pull](/data-mover-1.21/workflow-templates/service-tasks/triggerable-service-tasks.md#mail-pull) section.&#x20;

In both cases, the jobs associated with the contracts are listed in **Monitoring** → **Jobs**.

On the **Setup** → **Credentials** page, existing credentials can be sorted in the **Filters** panel on the right of the page. Insert the Credential Name and/or select the Credential Type and click on the **APPLY** button to filter results.


---

# 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-mover-1.21/transfer-protocols-and-connectors/client-connections/client-connection-pop3-or-imap/pop3-or-imap-credentials.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.
