Sends one email per input feature via Simple Mail Transfer Protocol (SMTP). Both HTML and Plain Text emails may be sent, each with one or more attachments.
To use this transformer, a server that accepts SMTP requests must be available and the connection parameters and authentication fully specified.
This transformer accepts any feature. One email will be sent for each feature that is received by the transformer.
Each input feature that results in a successfully sent email is output unchanged via this port.
Each input feature whose email could not be sent is output via this port. An fme_rejection_code attribute, having the value ERROR_DURING_PROCESSING, will be added, along with a more descriptive fme_rejection_message attribute which contains more specific details as to the reason for the failure.
Note: If a feature comes in to the Emailer already having a value for fme_rejection_code, this value will be removed. This removal occurs even if the feature is not rejected by the Emailer.
The email address of the sender.
The standard SMTP email address format consists of an optional display name enclosed in quotation marks (" ") followed by the actual email address enclosed in < >, or just the email address.
For example, specifying the address as:
"FME Lizard" <firstname.lastname@example.org>
would result in recipients seeing
FME Lizard as the sender of the email, whereas specifying the address as:
would have the recipients see just email@example.com as the sender.
Note that when using a Gmail connection, the email address of the sender must match the account name of the Gmail web service connection.
The email addresses of each of the primary recipients, separated by commas. The format of each address is identical to that for From.
The email addresses of each of the carbon-copied (Cc’d) recipients, separated by commas. The format of each address is identical to that for From.
The email addresses of each of the blind-carbon-copied (Bcc’d) recipients, separated by commas. The format of each address is identical to that for From.
The text to be used as the subject of the email.
The content of the email message.
The content can contain HTML markup. In addition to font styling and tables, images attached to the email can be embedded into the message as well by referencing the “content ID” of the attachment using the syntax:
<img src="cid:<content id>"/>
would embed the image attached to the email with the Content ID map.jpg
Zero or more files can be attached to the email. These may be static files that do not change from sent email to sent email, or they may be intermediate translation results created by a TempPathnameCreator/FeatureWriter combination.
For each attached file, the full pathname to the file must be specified. An optional Content ID can be given, which can be referenced in an HTML body, and will also set the default filename for that attachment if the recipient elects to save the attachment. Lastly, a MIME type can be specified. For most situations, autodetect is the best and most robust option, but specific MIME types can also be set.
The type of email service you would like to connect to. The options are Generic SMTP, which requires that you specify the connection parameters and optionally authenticate with a username and password; and Gmail, which lets you use a new or existing connection to Gmail.
The connection parameters available depend on the value of the Email Service parameter. Parameters for each Email Service are detailed below.
The hostname of the SMTP server through which the email will be sent.
The connection port the SMTP server is listening on.
The method used to secure the email contents as it is sent. Valid values are None (no security), TLS (Transport Layer Security), and SSL (Secure Sockets Layer).
The number of seconds to wait for the SMTP server to send the email. If the email is not sent in time, the sending is cancelled and the triggering feature will be output via the <Rejected> port.
Specifies whether or not the SMTP server requires authentication. If it is turned on, then a username and password for the SMTP service will be required.
The username for the SMTP server.
The password for the SMTP server.
Specifies a new or existing web connection to Gmail. This could be for the Google Gmail service, or you could create a new service based on it. See the Web Connections documentation for more details.
The number of seconds to wait for Gmail to send the email. If the email is not sent in time, the sending is cancelled and the triggering feature will be output via the <Rejected> port.
SMTP Connection Parameter Examples
To send an email, the host name, receiving port, and encryption method must be specified. Each of these is described above. Consult your system administrator for the settings you should use for the SMTP server parameters, but as a starting point, here are the settings for several common SMTP servers:
Amazon Simple Email Service (SES):
|Sender's Username||<your SES-generated username>|
|Sender's Password||<your SES-generated password>|
Substitute your region for <region> in the Host. For example, if your AWS region was us-east-1, then your host would be email-smtp.us-east-1.amazonaws.com
|Sender's Username||<your Gmail address>|
|Sender's Password||<your Gmail password>|
Note that using Gmail to send SMTP messages requires you to have to disable security on your Gmail account by following the instructions at https://www.google.com/settings/security/lesssecureapps and therefore is not recommended. Using the Gmail option for the Email Service parameter is preferred, since this will authenticate using OAuth 2.0, as recommended by Google.
You may have an in-house relay available to you. Default settings such as the above may work in such a case, but these are not recommended for a production system.
This transformer is often used to notify recipients of translation status. It is often used downstream from the FeatureWriter to either send statistics of the translation, or in fact the output of the translation, via email. The TempPathnameCreator transformer may be useful in such workflows.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Set values depending on one or more test conditions that either pass or fail.
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
|These functions manipulate and format strings.|
|A set of control characters is available in the Text Editor.|
|Math functions are available in both editors.|
|Date/Time Functions||Date and time functions are available in the Text Editor.|
|These operators are available in the Arithmetic Editor.|
|These return primarily feature-specific values.|
|FME and workspace-specific parameters may be used.|
|Creating and Modifying User Parameters||Create your own editable parameters.|
Dialog Options - Tables
Transformers with table-style parameters have additional tools for populating and manipulating values.
Enabled once you have clicked on a row item. Choices include:
Cut, Copy, and Paste
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers.
|Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output.|
|Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers.|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers.
Note: Not all tools are available in all transformers.
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for samples and information about this transformer on the FME Community.