Skip to main content

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

NameDescription
Input
BodyThe 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 AddressThe name of the to recipient and the domain with which they are associated. String variable containing the sender's email address.
SubjectPlease provide the subject line of the email from which you would like to retrieve the mail. String variable containing the desired subject line.
TopPlease specify the maximum number of emails you would like to retrieve. Integer variable representing the limit on the number of emails to fetch.
UnRead OnlyFetch only unread emails. Boolean variable to filter only unread emails.
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
DelayEnter the wait time in seconds (Example 5 seconds, i.e., 5) to start the activity. Integer variable representing the delay duration.
Output
ResultThe result will be returned as a List<Mail Message> variable, allowing you to utilize it for further activities.

How to use:

  1. Drag and drop the "Get Mails" activity onto the workflow.
  2. Configure the properties by specifying the desired criteria such as subject, sender address, and others.
  3. Optionally, configure the delay.
  4. 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.