Read IMAP Email
Description
The Read IMAP Email activity reads email messages from an IMAP mailbox using a configured Email Server connection and exposes the retrieved emails as structured output for downstream processing.
Common settings
Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.
Design-Time Configuration
Display Text
Specifies the activity's display name as shown on the workflow canvas.
Connection Name
Selects the IMAP connection used to access the mailbox.
Mail Folder
Specifies the mailbox folder to read emails from (for example, INBOX, Sent, or Drafts).
Default: INBOX.
Max Messages
Defines the maximum number of email messages to retrieve per execution.
Default: 10
Minimum: 1.
Filters
Provides advanced filtering criteria to retrieve specific emails.
For detailed information on configuring filters and expressions, see Email Filters.
The Number of Messages setting mentioned in the Email Filters documentation is not applicable to the Read IMAP Email activity.
Read Only Unread Mails
Controls whether only unread messages are fetched.
- True – Only unread emails are read.
- False – All emails in the folder are read.
Default:
True.
Mark As Read
Determines whether the retrieved emails are marked as read after processing.
- True – Sets the Seen flag on the messages.
- False – Leaves message status unchanged.
Default:
True.
Execution Control (Wait All Incoming)
Controls how the activity behaves when multiple incoming execution paths converge.
For detailed behavior and examples, see Execution Control – Wait All Incoming.
Error Handling (On Error)
Defines how the workflow proceeds if the activity encounters an error.
For supported strategies (Fault, Continue, Suspend, Retry), see On Error Handler.
Output
Emails
Returns a collection of Email objects. Each email object includes the following properties:
- From – Sender email address
- To – Recipient email addresses
- Subject – Email subject
- TextBody – Plain text content
- HtmlBody – HTML content
- ReceivedAt – Date and time the email was received
- MessageId – IMAP UID (unique identifier)
- InternalId – Internet Message-ID header value
- Attachments – Collection of EmailAttachment objects. Each attachment provides File for file-consuming activities and AttachmentReference for attachment retrieval.
- AttachmentReference – Used by attachment-specific activities such as Get IMAP Email Attachment.
See Mail Models and File Reference.
Count
Returns the total number of emails read during the execution.
Example: Process message attachments
- Select the IMAP connection, mail folder, and Max Messages.
- Enable Read Only Unread Mails to select unread messages. Mark As Read defaults to True; leave it enabled when subsequent reads should skip these messages.
- Use Iterator with Emails as its Items. Bind message fields from Current Item.
- For each email attachment, pass its File to a file-consuming activity, or its AttachmentReference to Get IMAP Email Attachment when Base64 content is required.
Count is the number returned by this execution, not the total mailbox size. Reading with Mark As Read off can select the same unread messages again. Marking read occurs during retrieval, before downstream business processing completes. Plan recovery if a later activity fails.