Retrieves an IMAP email message from a specified server.
- 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).
- MailFolder - The mail folder from which the messages are to be retrieved.
- Server - The email server host that is to be used.
- Port - The port used to get the email message.
- Email - The email account used to get the message.
- Password - The password of the email account used to get the message.
- SecurePassword - The password of the email account used, as a secure string.
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
- DeleteMessages - Specifies if the read messages should be marked for delete.
- FilterExpression - Returns only those mail messages matching the filter expression.
- FilterExpressionCharacterSet - The MIME name of the character set to be used for the filter expression.
The list of valid MIME names that can be used is available at Character Sets.
- 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, OldestFirst. The default value is Newest First.
- SecureConnection - Specifies the SSL and/or TLS encryption to be used for the connection.
- 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.
The following table shows examples of filters that can be useful when you query IMAP mail messages:
All mail messages that contain "Welcome" in the subject
All mail messages that contain "Welcome" in the subject and are from "email@example.com"
"SUBJECT Welcome FROM firstname.lastname@example.org"
All mail messages that contain "Welcome" in the subject and are not from "email@example.com"
"SUBJECT Welcome NOT FROM firstname.lastname@example.org"
All mail messages that contain "Please review" in the body
"BODY ""Please review"""
All flagged mail messages (i.e. \Flagged flag set)
All mail messages since 02/23/2021
All non-delivery report mail messages received on 02/23/2021 or 01/23/2021
"OR (ON 23-Feb-2021 FROM email@example.com) (ON 23-Jan-2021 FROM firstname.lastname@example.org)"
All mail messages unanswered today and from an email address that contains "examples.com"
"UNANSWERED ON " + DateTime.Today.ToString("dd-MMM-yyyy") + " FROM examples.com"
Learn more about how to specify a filter expression here.
Updated 17 days ago