You are here: Reference Manual > FME Server Services > Notification Service > Publishers > Example Email (SMTP) Publication

Example Email (SMTP) Publication

To configure an Email (SMTP) Publication, open the Web User Interface and select Manage > Notifications (or, from the Home page, Create Notification), and provide the following:

  • A name for the publication.
  • One or more topics to receive notifications.
  • Protocol Email(SMPT).
  • Email User Name: Enter the user name of the e-mail address on the FME Server host system that receives the e-mails. For example, if the e-mail address is user@serverhost.com, enter user.
  • Note: Email addresses cannot be duplicated across Email publications. There must be a unique email address for each email publication. Email addresses are case-insensitive.

Click OK.

The following example Email (SMTP) publication receives email messages at demo@myserver, where myserver is the host name, and publishes notification messages to topic SAMPLE_TOPIC.

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"

}

Note: The keywords of the above JSON message can be customized by changing the config.xml file. No code changes are required. For more information, see Email (SMTP) Publisher Settings.