span8
span4
span8
span4
This article was updated using FME Server 2018.1,but steps used can be applied to FME Server 2016 and above.For the FME Server 2015 version of this article,please see:Sending email,Part 5: Sending an email with attachments.
Previous section:Sending email,Part 4
This tutorial is part of the seriesEmail in FME Server.This is the fifth article in the sending emails series.This article will cover how to send emails with attachments through the FME Server.
As covered inpart 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 thepart 2of the tutorial,or download the attached fmw file.
TThe 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 accessibly shared drive (e.g.UNC path) if you are using on-premises FME Server.Alternatively,you can use theResources foldersto 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,seeAbout Log Files in FME Server.
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 theFME Server Playground
.
Sending email,Part 5: Sending an email with attachments (2015)
Receiving email,Part 1: Setting up a topic and an email address (2015)
Sending email,Part 4: Sending prettier email using HTML (2015)
Receiving email,Part 2: Processing email with a workspace (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 2: Sending an email using the FMEServerNotifier (2015)
Sending email,Part 3: Sending an email when a workspace completes (2015)
© 2019 亚搏在线Safe Software Inc |Legal