# Email

## Introduction

The Email library in Automate provides actions to automate email processes within workflows. This library consists of 4 main actions designed to interact with email servers and manage email-related tasks.

The purpose of the Email library is to streamline email automation tasks, such as receiving, moving, saving attachments, and sending emails, by providing easy-to-use actions.

## What is Email?

The Email component within Automate allows users to seamlessly integrate email functionalities into their automation workflows. It provides a set of actions to interact with email servers, retrieve, process, and send emails efficiently.

#### Key Features

* <mark style="color:orange;">**Get Mail**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Retrieve emails from specific mailboxes based on defined filters.</mark>
* <mark style="color:orange;">**Move Mail**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Move emails to designated folders within the mailbox.</mark>
* <mark style="color:orange;">**Save Attachments**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Save email attachments to specified locations.</mark>
* <mark style="color:orange;">**Send**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Compose and send emails to specified recipients.</mark>

## How To Use Action

### Get Mail

<figure><img src="/files/fIikaOpnMYUFrIfe3bPr" alt=""><figcaption></figcaption></figure>

**Description:** The **Get Mail** action retrieves emails from a specific mailbox based on defined filters.

**Usage:**

1. **Connection Method:**
   * <mark style="color:green;">Select either POP or IMAP.</mark>
2. **Secure Connection (SSL/TLS):**
   * <mark style="color:green;">Check this option if the connection is secure.</mark>
3. **Host Address and Port:**
   * <mark style="color:green;">Enter or select the host address and connection port.</mark>
4. **Mailbox Credentials:**
   * <mark style="color:green;">Enter or select the mail address and password.</mark>
5. **Filters (Optional):**
   * <mark style="color:green;">Define filters such as "From Address," "CC," "Email Subject," and "Email Description" if needed.</mark>
6. **Action After Retrieval:**
   * <mark style="color:green;">Choose the action after retrieving mail (e.g., delete, mark as read).</mark>
7. **Assign Output:**
   * <mark style="color:green;">Select an array variable to store the retrieved mails.</mark>

### Move Mail

<figure><img src="/files/JQpRVUx1aW12aC8nd8qU" alt=""><figcaption></figcaption></figure>

**Description:** The **Move Mail** action moves emails to a specified destination folder.

**Usage:**

1. **Destination Folder:**
   * <mark style="color:green;">Enter or select the folder where the mail will be moved.</mark>
2. **Mail to Move:**
   * <mark style="color:green;">Specify the mail to be moved using its ID.</mark>

### Save Attachments

<figure><img src="/files/WKACWuFwKWDAU2UvGb1w" alt=""><figcaption></figcaption></figure>

**Description:** The **Save Attachments** action saves mail attachments to a specified location.

**Usage:**

1. **Attachment Source:**
   * <mark style="color:green;">Enter or select the source of the attachment.</mark>
2. **Destination Folder:**
   * <mark style="color:green;">Enter or select the folder where the attachments will be saved.</mark>

### Send Mail

{% embed url="<https://drive.google.com/file/d/1LhSNmCCD3CJdnaJvhx9hpCR_4TEoGfcP/view?usp=sharing>" %}

**Description:** The **Send** action sends an email to specific recipients.

**Usage:**

1. **Connection Details:**
   * <mark style="color:green;">Enter or select the host address and connection port.</mark>
2. **Mailbox Credentials:**
   * <mark style="color:green;">Enter or select the mail address and password.</mark>
3. **Sender and Recipient Information:**
   * <mark style="color:green;">Enter the sender's mail address (From) and recipient's mail address (To).</mark>
4. **Email Details:**
   * **Subject:** <mark style="color:green;">Enter the email subject.</mark>
   * **Attachments:** <mark style="color:green;">Browse or select attachments.</mark>
   * **Body:** <mark style="color:green;">Enter the email body content.</mark>

{% hint style="info" %}
To add more than one email addresses, user needs to press enter after fill the to field on the Action Control Center.
{% endhint %}

***

## Additional Tips

### [**Use Cases**](/userguide/use-cases.md)

### [FAQ](/userguide/faq.md)


---

# 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.autommate.com/userguide/libraries/integration/email.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.
