activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 6, 2024

Get IMAP Email List

UiPath.Mail.IMAP.Activities.GetIMAPMailMessages

Description

Retrieves an IMAP email message from a specified server.
Note: This activity is called Get IMAP Mail Messages in versions older than 1.24.

Project compatibility

Windows - Legacy | Windows | Cross-platform

Windows - Legacy configuration

Common
  • 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).
Host
  • 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.

    Note: Using an IP address in the Server field instead of a DNS name only works when there are no SSL connections or if there is an SSL certificate issued for the IP address.
Logon
  • ClientName - The Name property of the IMAP client implementation.
  • ClientVersion - The Version property of the IMAP client implementation.
  • Email - The email account used to get the message.
  • Password - The password of the email account used to get the message. If UseOAuth is selected, the value of this parameter must be an OAuth2 access token.
  • SecurePassword - The password of the email account used, as a secure string. If UseOAuth is selected, the value of this parameter must be an OAuth2 access token.
  • UseOAuth - Indicates whether to use an OAuth2 access token instead of a password. By default, this option is not selected.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Options
  • 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.

    Note: The list of valid MIME names that can be used is available at Character Sets.
  • Ignore CRL - Specifies whether to ignore the Certificate Revocation List validation when connecting. This field only accepts Boolean values and variables. If left empty, the default False value is used.
  • 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.
Output
  • Messages - The retrieved messages as a collection of MailMessage objects.

Windows, Cross-platform configuration

  • Connection - The connection established in Integration Service for the Mail connector.
  • Email folder - The mail folder from which the messages are to be retrieved.
  • Additional filters - Returns only those mail messages matching the filter expression.
Common
  • 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).
Options
  • Limit emails to first - The number of messages to be retrieved, starting from the top of the list. This field spports Int32 type input.
  • Unread only - Specifies whether to retrieve only unread messages. Default value: True.
  • Mark as read - Specifies whether to mark retrieved messages as read.
  • Delete messages - Specifies if the read messages should be marked for delete.
  • Order by date - Order mail messages by date. Choose one of two options: Newest First, OldestFirst. The default value is Newest First.
  • 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.

Output
  • Email list - The retrieved messages as a collection of UiPathMailMessage objects.

Filtering examples

The following table shows examples of filters that can be useful when you query IMAP mail messages:

Query

Filter Expression

All mail messages that contain "Welcome" in the subject

"SUBJECT ""Welcome"""

All mail messages that contain "Welcome" in the subject and are from "john.smith@example.com"

"SUBJECT ""Welcome"" FROM john.smith@example.com"

All mail messages that contain "Welcome" in the subject and are not from "john.smith@example.com"

"SUBJECT ""Welcome"" NOT FROM john.smith@example.com"

All mail messages that contain "Please review" in the body

"BODY ""Please review"""

All flagged mail messages (i.e. \)\)Flagged flag set)

"FLAGGED"

All mail messages since 02/23/2021

"SINCE 23-Feb-2021"

All non-delivery report mail messages received on 02/23/2021 or 01/23/2021

"OR (ON 23-Feb-2021 FROM postmaster@outlook.com) (ON 23-Jan-2021 FROM postmaster@outlook.com)"

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"

Note: Learn more about how to specify a filter expression here.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.