FME Version
Files
-
- 70 KB
- Download
As of FME Server 2019+, this functionality can be completed using FME Server Automations. For more information, please see Send email from Automations. Note that this tutorial series will no longer be updated, if you encounter an error, please contact Safe Support.
Introduction
This tutorial is part of the series Email in FME Server. This is the second article in the sending emails series. The first article demonstrated how to create a topic and a subscription. This article will demonstrate how to use a workspace to send email using the FME Server Notifier.
Prerequisites
- FME Server 2016 or later installed
- Access to an SMTP server (a Gmail account works)
- Part 1 of this tutorial completed
Step-by-step Instructions
Creating the workspace
In order to send an email from a workspace, you must generate the JSON for the email notification and then notify the Server.
- Open a new workspace in FME Workbench
- Add a Creator transformer to start your process
- Use the FMEServerEmailGenerator to set up the JSON for the notification. The FMEServerEmailGenerator is a transformer, which generates JSON appropriate for sending emails via FME Server’s notification service. In the FMEServerEmailGenerator set up the following parameters:
- To: your email
- Subject: Test Email
- Content: This email was sent using FME Server
-
Add an FMEServerNotifier, set the connection to your FME Server. Then using text_line_data as its content and set the topic to the SEND_EMAIL topic you created in part 1 of this tutorial.
- Save this workspace as it will be used in the next tutorial.
Note: If you wish to add/remove the log file attachment from the Data Download and Job Submitter result, see the Key Property ATTACH_TRANSFORMATION_LOG in this documentation.
Publishing and running the workspace
- Publish the workspace to FME Server, selecting the Job Submitter service.
- Run the workspace on FME Server. If the workspace was successful, you should receive an email shortly.
Troubleshooting
If you don’t receive an email, you can do the following to troubleshoot:
From the Notifications page in the FME Server web interface, select the Topic Monitoring tab and enable monitoring on the SEND_EMAIL topic. 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 About Log Files in FME Server.
Conclusion
In this part of the tutorial, we’ve sent an email using FME Server and an SMTP server. This can easily be expanded to send an email containing a list of attributes, a count of features, or a file location.
Comments
0 comments
Please sign in to leave a comment.