Monitors an email server for incoming mail and fires when email arrives.
Sets the hostname of the email server.
Sets a time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.
Sets the mail server port.
Sets the credentials to access the mail server
Sets the mail protocol used to communicate with the mail server. It can be either IMAP or POP3
Sets whether a processed email is automatically deleted after control returns to the mail trigger. Note that when using the POP3 protocol, the JavaMail implementation does not appear to allow messages to be deleted.
Sets the name of the IMAP folder that is checked for email messages.
Sets the name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires.
The Mail Trigger returns its results in the flow context variable “result”. These results include information about the mail subject and its body, the addresses associated with the mail, and attachments for the mail. You can access the Mail Trigger results from the following fields:
|Flow Context Variable||Field||Java Type||Description||Prescript / Postscript Example|
|RESULT||attachments||List<MailTrigger.MailAttachment>||The file attachments in the mail message. |
See Using MailAttachments below for more information.
|RESULT||body||String||The body of the mail message.|| |
|RESULT||cc_addresses||List<String>||The carbon copy recipients of the mail message.|| |
|RESULT||content_type||flux.notification.MailContentType||The content type of the mail message.|| |
|RESULT||from_addresses||List<String>||The senders of the mail message.|| |
|RESULT||reply_to_addresses||List<String>||The reply-to addresses of the mail message.|| |
|RESULT||sent_date||Date||The date the mail message was sent.|| |
|RESULT||size||int||The size of the mail message.|| |
|RESULT||status_flags||javax.mail.Flags||Status flags for the email message.|| |
|RESULT||subject||String||The subject of the mail message.|| |
|RESULT||to_addresses||List<String>||The recipients of the mail message.|| |
To copy a result field, you can use a data map like:
If a message picked up by a mail trigger contains attachments, they are returned as MailAttachment objects. These objects have two fields:
|Field||Description||Prescript / Postscript Example|
|body||A byte containing the body (content) of the attachment.|| |
|filename||The filename of the attachment.|| |
You can also access the attachments through runtime data mapping. For example, you could use the following data map to pass the attachments from the mail trigger into a for each collection element action:
Once the For Each Collection Element Action adds the next attachment to the flow context, you can access its fields with another data map: