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:发送电子邮件,第5部分:发送带有附件的电子邮件。
Previous section:发送电子邮件,第4部分
This tutorial is part of the series电子邮件在FME服务器。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 in第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第2部分of 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 the资源文件夹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关于在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的游乐场
。
© 2019 Safe Software Inc |Legal