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.
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
"Safe Support" <firstname.lastname@example.org>
would result in recipients seeing Safe Support as the sender of the email, while specifying the address as:
would have the recipients see just email@example.com as the sender.
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.
Indicates if the email message will have an HTML or Plain Text body.
The content of the email message. If the Body Type was Plain Text, then the content will contain no formatting other than line endings.
If the Body Type was HTML, then 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 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.
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>|
Subsitute 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.
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.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.