Retrieves an email message from Exchange.
- DisplayName - The display name of the activity.
- TimeoutMS - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).
- EmailAutodiscover - Searches automatically for an Exchange server by using an email address from that server. This works only if the Exchange server has Autodiscover enabled.
- ExchangeVersion - Specifies the lowest version of the Exchange server that is used. The options displayed in this field range from 2007 to the 2013 version. Please note that the version number indicates the lowest level of service you support. This means that if you have a 2016 exchange server, you can select the Exchange2013 option.
- Server - The email server host that is to be used.
- Domain - The Active Directory domain to connect to.
- Password - The password of the Exchange account used to retrieve the message.
- SecurePassword - The password of the Exchange account used, as a secure string.
- User - The username of the Exchange account used to retrieve the message.
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
- ApplicationId - The ID of your Azure Active Directory Application. This field supports only strings and
- AuthenticationType - The authentication options for Office 365. The available options are:
- UserNameAndPassword - Standard Username and Password Login.
- Interactive - Interactive Token (Auth 2.0).
- Windows Integrated - Integrated Windows Authentication.
- DirectoryId - The ID of your Azure Active Directory. This field supports only strings and
- FilterByMessagesIds - Returns only those mail messages with the specified message IDs. If set, then the FilterExpression parameter is ignored. This field supports only
Filtering by message IDs is supported starting with Exchange Server 2013.
- FilterExpression - Returns only those mail messages matching the filter expression.
The filter expression can be used starting with Exchange Server 2010.
- GetAttachments - Specifies whether to retrieve the attachments in the email message. By default, this check box is cleared.
- IsBodyHtml - Specifies whether the body of the message is written in HTML format.
- MarkAsRead - Specifies whether to mark retrieved messages as read. By default, this check box is cleared.
- OnlyUnreadMessages - Specifies whether to retrieve only unread messages. By default, this check box is selected.
- OrderByDate - Order mail messages by date. Choose one of two options: Newest First, Oldest First. The default value is Newest First.
- Top -The number of messages to be retrieved, starting from either the newest or the oldest, depending on the OrderByDate parameter.
- Messages - The retrieved messages as a collection of MailMessage objects.
Starting with UiPath.Mail.Activities version 1.10.4, the MailMessage object exposes:
- The Message-ID of a mail message, for example
- The Categories associated with a mail message, for example
- MailFolder - The mail folder from which the messages are to be retrieved.
- To retrieve emails from a public folder, the value of the MailFolder field should be exactly as the name of the public folder that is displayed in Favorites.
- When using a public folder, if there is a personal folder in the mailbox with the same name, the activity returns the emails from the personal folder. In order to return the emails from the public folder, the personal folder must be renamed.
- The activity does not support Posts items. If there are Posts items in the public folder, the activity will fail unless you specify a proper filter expression, for example, FilterExpression = “kind:emails”.
- SharedMailbox - Enables the retrieving of messages from a shared mailbox linked to an Exchange user account.
The following table shows examples of filters that can be useful when you query Exchange mail messages:
All mail messages that contain "welcome" in the subject
All mail messages that contain "welcome" in the subject and are from "firstname.lastname@example.org"
"subject:welcome AND from:""email@example.com"""
All mail messages from an email account from example.com
All mail messages that contain "please review" in the body
All mail messages with attachments
All mail messages with high importance having a pdf file attached
"importance:high AND attachment:.pdf"
All mail messages having 'Red category' and 'Blue category' as their categories
"category:Red category, Blue category"
All mail messages of type meeting (e.g. calendar invites, responses)
All mail messages received today
All mail messages received on 10/23/2020
All mail messages received since 10/23/2020
To learn about how to specify a filter expression, please read Perform an AQS search by using EWS in Exchange.
Updated 18 days ago