FME Flow: 2024.2
Configuring an Email (SMTP) Publication
In the FME Flow Web User Interface, select Notifications > Publications, and click New. Provide the following:
- A name for the publication.
- Protocol: Email(SMTP).
- Specify the Topics you want to publish to using the drop-down selector. To create a topic and use it right away, click +.
- Email User Name:
- To email FME Flow directly, enter the user account name to receive the email on the FME Flow host system. For example, if the FME Flow host name is services.internal, and the email address is user@services.internal, enter user.
- To email a separate server that relays the email to FME Flow, enter the user name of the email address on the email server. For example, if the email address is user@company.com, enter user.
Note A rule must be configured on the email server that relays emails for the specified Email User Name on to FME Flow. The rule must specify the FME Flow machine name and SMTP port. To determine the port, see Configuring FME Flow to Receive Email. - Download Attachments To:
- Select a Resources folder (...).
- Enter your own location. Directory paths must use forward slashes (/) or escaped backslashes (\\).
(Optional) Specify a location to download any attachments.
If not specified, any attachments are saved to the following default temporary folder:
$(FME_SHAREDRESOURCE_SYSTEM)/temp/emailattachments/<date>-<automation_name>-<email_subject>-<automation_id>\<filename>.
If specified, the following subfolder is created in the specified location:
<specifiedLocation>/<date>-<automation_name>-<email_subject>-<automation_id>/<filename>
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 _.
Click OK.
Notification Content
The notification content that is generated by the email publisher includes the following keywords:
- fns_type – The value is “email_publisher” to identify the message is being relayed via the Email publisher.
- email_publisher_from – The email address of the email client that sent the mail.
- email_publisher_to – The email address that received the email (The same as what is configured in the Email publication).
- email_publisher_subject – The email subject
- email_publisher_content{n} – The email message content. Multiple "contents" appear in conjunction with multiple "content types," and have a suffix starting at {0}, {1}, {2}, and so on.
- email_publisher_content_type{n} – The email message content type. Multiple content types have a suffix starting at {0}, {1}, {2}, and so on. The most common content types are text/plain and text/html.
- email_publisher_sent – The date the email was sent
- email_publisher_received – The date the email was received
- email_publisher_attachment{n} – The attachment directory. Multiple attachments have a suffix starting at {0}, {1}, {2}, and so on. Forward slashes are supported. Backslashes must be escaped as double blackslashes.
The following is a sample JSON notification message published by the Email publisher upon receiving an email to address 'demo@somehost.com':
{
"fns_type": "email_publisher",
"email_publisher_to": "demo@somehost.com",
"email_publisher_subject": "MIME message from sender",
"email_publisher_content{0}": "Testing Email",
"email_publisher_content_type{0}": "text/plain",
"email_publisher_from": "sender@somehost.com",
"email_publisher_received": "Thu May 17 11:15:46 PDT 2012",
"email_publisher_sent": "Thu May 17 11:15:46 PDT 2012",
"email_publisher_attachment{0}": "C:\\Temp\\demo246129673106713_canada.xsd"
}