> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/rpa-studio/application/mail/get-imap-mail.md).

# Get IMAP Mail

Retrieves IMAP mail messages.

This activity retrieves email messages using an IMAP server.

### Email Configuration

* **Email Id:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The email account used to get the message.\\
* **Password:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The password of the email account used to get the message.\\
* **Mail Folder:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The mail folder from which the messages are to be retrieved.

### Server Configuration

* **Server:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The email server host that is to be used.\\
* **Port:** [`Integer Argument`](/getting-started/rpa-studio/arguments.md#integer)\
  The port used to get the email message.\\
* **Secure Connection:**\
  Specifies the SSL and/or TLS encryption to be used for the connection.The following are the available options.
  * `Auto` - Allows the IMailService to decide which SSL or TLS options are to be used . `Default`
  * `None` - No SSL/TLS encryption is used.
  * `SslOnConnect` - Uses SSL/TLS encryption immediately.
  * `StartTls` - Uses the TLS encryption immediately after reading the greeting and capabilities of the server. If the server does not support the StartTLS extension, the connection fails.
  * `StartTlsWhenAvailable` - Allows the usage of TLS encryption immediately after reading the greeting and capabilities of the server only if the server supports StartTLS.

### Options

* **Mark As Read:**
  * `True` - The activity will mark the retrieved messages as read.
  * `False` - The messages will remain as unread.\\
* **Delete Messages:**
  * `True` - The activity will mark the read messages for deletion.
  * `False` - The read messages won't be deleted.\\
* **All Unread Messages:**
  * `True` - The activity will retrieve all unread messages.
  * `False` - The activity retrieves all read and unread messages.\\
* **Limit:** [`Integer Argument`](/getting-started/rpa-studio/arguments.md#integer)\
  The number of messages to be retrieved from the top.

### Filters

We can select the condition for the filter data we enter in the text field in the filter properties so as to filter the mail collection.

* **Mail Topic:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) `Optional`\
  Filter messages based on message subject. \\
* **Mail Sender:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) `Optional`\
  Filter messages based on the sender's address.\\
* **Mail Text Body:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) `Optional`\
  Filter messages based on message hypertext content.

### Output

* **Messages:** [`List Variable`](/getting-started/rpa-studio/variables.md#list)\
  The output is a List that stores variables of type [MimeMessage](/getting-started/rpa-studio/variables/activity-variables.md#mimemessage).
