Get Mail
AutomatR.ExchangeServer.Activities.GetMails
The "Get Mails" activity in AutomatR is part of the Exchange Server activities package, allowing you to retrieve matching email messages from a specified mailbox. This activity simplifies the process of fetching emails based on various criteria, such as subject, sender address, and more.
Properties
| Name | Description |
|---|---|
| Input | |
| Body | The body of an email is where the writer explains the email's main point. String variable containing the desired content to match in the email body. |
| From Address | The name of the to recipient and the domain with which they are associated. String variable containing the sender's email address. |
| Subject | Please provide the subject line of the email from which you would like to retrieve the mail. String variable containing the desired subject line. |
| Top | Please specify the maximum number of emails you would like to retrieve. Integer variable representing the limit on the number of emails to fetch. |
| UnRead Only | Fetch only unread emails. Boolean variable to filter only unread emails. |
| Misc | |
| Display Name | The display name of the activity. A display name is automatically generated when you indicate a target. |
| Optional | |
| Delay | Enter the wait time in seconds (Example 5 seconds, i.e., 5) to start the activity. Integer variable representing the delay duration. |
| Output | |
| Result | The result will be returned as a List<Mail Message> variable, allowing you to utilize it for further activities. |
How to use:
- Drag and drop the "Get Mails" activity onto the workflow.
- Configure the properties by specifying the desired criteria such as subject, sender address, and others.
- Optionally, configure the delay.
- Execute the workflow to retrieve matching email messages.
Example: Consider an example where the "Get Mails" activity is used to fetch the last 5 unread emails with the subject containing "Invoice" from a specific sender:
Get Mails:
Subject: "Invoice"
From Address: "accounts@example.com"
Top: 5
UnRead Only: True
Delay: 2
Messages: mailMessagesList
In this example, the activity fetches the last 5 unread emails with the subject containing "Invoice" from the sender "accounts@example.com". The result is stored in the mailMessagesList variable for further handling in the workflow.