Get Outlook Mail Messages
Description
Returns mail messages from Outlook
Properties
Host
- Account – Specify the mail account from which to retrieve the mail messages.
- Mail Folder – Specify the mail folder from which to retrieve the messages.
Misc
- DisplayName – Add a display name to your Activity.
- Private – By default, Activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.
Optional
- Continue On Error – Specifies if the automation should continue even when the Activity throws an error. This field only supports Boolean values (True, False). The default value is False.
Catches no error if this Activity is present inside the Try-Catch block and the value of this property is True.
Options
- Delete Messages – Specify the Boolean value true for deleting the read messages.
- Mark Mail As Read – Specifies whether to mark retrieved messages as read.
Output
- Messages – The retrieved messages as a collection of MailMessage objects.
Email Filters
Users can apply filter criteria to extract the needed emails using this Activity. The Activity provides the user to build the filter expressions. You can click the Filter button as part of this Activity's body to create your filter expressions.
Clicking on the Filter button brings the filter expression builder dialog.
Number of Records
Filter by the number of messages to retrieve. If not specified, returns all the mails which satisfy the filter condition.
Building filter expressions
- Click on the + button available in the dialog
- Select the field from the dropdown on which you need to filter the emails
- Select the conditional operator to be used from the dropdown
Note: The conditional operator list dynamically changes based on the field selected
- Specify the value to be used for the filter
Note: If you need to build a complex expression, you can add more expressions by combining them with appropriate conjunctions.
- Click on the + button
- Select the conjunction from the dropdown
- Continue building expressions
Expression Grid
Column | Description |
---|---|
Logic | Select the logical conjunction to be used to combine the expressions from the dropdown |
FilterField | Apply the filter from the dropdown on the selected field |
Condition | Select the conditional operator to use in the expression from the dropdown |
Value | Specify the value of the selected field to filter |
Logical Conjunctions
Option | Description |
---|---|
AND | Performs logical AND operation between the selected expressions |
OR | Performs logical OR operation between the fixed terms |
Email Filter Fields
Field | Description |
---|---|
Subject | Retrieves emails that match the specified subject |
Sender | Retrieves emails that match the specified email address |
To | Retrieves emails that match the specified receiver email address |
Cc | Retrieves emails that match the specified CCed email address |
Bcc | Retrieves emails that match the specified BCCed email address |
Mail Body | Retrieves emails that match the words in the mail body |
Received | Retrieves emails that match the received Date of mails |
Sent | Retrieves emails that match the sent Date of mails |
Unread Mails Only | Retrieves the unread emails |
Read Mails Only | Retrieves the read emails |
Has Attachments | Retrieves emails that contain attachments |
Importance | Retrieves emails that match the specified mail priority. The value can be "MailPriority.Low", "MailPriority.Normal", or "MailPriority.High" |
Example
Download Example