FME Flow: 2024.1

Email - IMAP

The Email - IMAP trigger receives email messages from an IMAP server.

The Email - IMAP trigger has two output ports. The success port () can send a message if the trigger fetches successfully. The failure port (x) can send a message if the trigger fails to fetch.

Warning  When the Email - IMAP trigger polls the IMAP server, every unread email in the in-box is marked as read.
Note  IMAP access must be enabled on the email account that is polled for messages.


Tip  To test that your parameters work as expected, click Validate.
  • IMAP Server Host: Provide the host name or IP address of the IMAP server.
  • IMAP Server Port: Provide the TCP port over which IMAP communication takes place.
  • IMAP Email Account/Password: Provide the email address and password of the account receiving emails over IMAP.
  • Note  IMAP access must be enabled on the email account that is polled for messages.
  • Connection Security: Specify the encryption mechanism to use for the IMAP connection. The mechanism selected must work over the specified port.
  • Verify SSL Certificate: If Yes, the connection to the specified IMAP Server Host is verified with a valid, signed SSL certificate. If No, the connection is not verified with an SSL certificate. This option is not secure and not recommended unless absolutely necessary, such as when using a self-signed certificate.
  • Poll Interval: Specify how often to poll the IMAP server for email.
  • Emails to Fetch: Choose New Emails Only to fetch messages that are received after this automation is created. Choose Unread Emails to fetch all unread messages from the inbox.
  • Warning  When the Email - IMAP trigger polls the IMAP server, every unread email in the in-box is marked as read, regardless of this setting.
  • Filter Type: Allows you to fetch only the messages specified by the filter, based on content in the subject line. Filter Type can be:
  • Subject Filter (optional): Provide the filter, according to the specified Filter Type. Wildcard characters are not supported. If blank, no filter is applied, and all unread/new messages are fetched.
  • Download Attachments To (optional): Specify a location to download any attachments.
    • Select a Resources folder (...).
    • Enter your own location. Directory paths must use forward slashes (/) or escaped backslashes (\\).
    • If not specified, any attachments are saved to the following default temporary folder:


      If specified, the following subfolder is created in the specified location:


      If <specifiedLocation> is invalid, attachments are saved to the default temporary folder.

      If <automation_name>, <email_subject>, or <filename> contains invalid characters, these characters are stripped. Invalid characters are \/:*?\"<>|&='+%#. Whitespace characters are converted to _.

  • Client ID (optional): For open authorization (OAuth) as a registered application with the Microsoft identity platform, specify the Application (client) ID. The client ID is created when configuring an Azure Active Directory tenant.
  • Note  A client secret is not required.

Output Attributes

See Also

Attribute Description
time Event time
source Event type

(Failure port only) Error type:

  • InvalidMessage: An error occurred while configuring this component, such as missing or malformed values.
  • DeadLetter: An error occured while connecting to an external resource. Examples may include connection issues, invalid credentials, or generic external resource exceptions.
error.message (Failure port only) Error message
email.subject (Success port only) Email subject
email.body (Success port only) Email body

(Success port only) Email attachment

Note  If the email contains multiple attachments, this attribute accesses only the first attachment. To access multiple attachments, use email.attachments instead.
email.attachments (Success port only) Path to directory containing all email attachments
email.sent (Success port only) Time sent
email.received (Success port only) Time received
email.from (Success port only) Sent from address (Success port only) Sent to address
email.contentType (Success port only) Email body content type