span8
span4
span8
span4
This article is specific to FME Server 2015. For the latest version of this content please visit: Sending email, Part 5: Sending an email with attachments. For the FME Server 2014 version of this article please see: Sending email, Part 5: Sending an email with attachments (2014)
This tutorial is part of the series Email in FME Server (2015)
Previous section: Sending email, Part 4
As covered in part 2, in order to send an email from a workspace, you must generate the JSON for the email notification and then notify the Server. To add support for attachments, the email_attachment keyword needs adding to the JSON with a path to the file you wish to send. The FMEServerEmailGenerator handles this automatically for us.
You can use the workspace from the part 2 of the tutorial, or download the attached fmw file.
The path to the data must be accessible to the FME Server Engine that runs the job. You should either be pointing to data locally on the server, or on an accessible shared drive (e.g. UNC path) if you are using on premises FME Server. Alternatively, you can use the Resources folders to store the data for the attachments [e.g $(FME_SHAREDRESOURCE_MYDATA)/Parks.zip].
If you don’t receive an email, you can do the following to troubleshoot:
Enable monitoring on the SEND_EMAIL topic in the FME Server web interface. This will show you what content is being received on the topic
If JSON content is being received in the topic, your SMTP settings are probably incorrect. Review them, and try again.
For more information about troubleshooting notifications with log files, see Definitive FME Server Log files.
In this part of the tutorial, we’ve sent an email with an attachment using FME Server and an SMTP server. We did this from a workspace using the FMEServerEmailGenerator transformer but all this is doing is generating JSON and submitting it to the FME Server via the FMEServerNotifier transformer. You can do the same programatically as defined in the FME Server Playground.
{ this: "is a json sample", with: [ "some", "arrays" ] }
Sending email, Part 4: Sending prettier email using HTML (2015)
Receiving email, Part 2: Processing email with a workspace (2015)
Sending email, Part 2: Sending an email using the FMEServerNotifier (2015)
Sending email, Part 1: Setting up a topic and an email subscriber (2015)
Receiving email, Part 3: Using email attachments (2015)
Sending email, Part 3: Sending an email when a workspace completes (2015)
Receiving email, Part 1: Setting up a topic and an email address (2015)
Sending email, Part 5: Sending an email with attachments
Sending email, Part 2: Sending an email using the FMEServerNotifier
© 2019 Safe Software Inc | Legal