Emailer
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.
Input Ports
This transformer accepts any feature. One email will be sent for each feature that is received by the transformer.
Output Ports
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. Anfme_rejection_codeattribute, having the valueERROR_DURING_PROCESSING, will be added, along with a more descriptivefme_rejection_messageattribute which contains more specific details as to the reason for the failure.
Note: ">Note:If a feature comes in to the Emailer already having a value forfme_rejection_code, this value will be removed. This removal occurs even if the feature is not rejected by the Emailer.
Parameters
Addressing
The email address of the sender.
The standardSMTP email address formatconsists 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"
would result in recipients seeing Safe Support as the sender of the email, while specifying the address as:
support@safe.com
would have the recipients see justsupport@safe.comas 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 forFrom.
The email addresses of each of the carbon-copied (Cc’d) recipients, separated by commas. The format of each address is identical to that forFrom.
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 forFrom.
Message
The text to be used as the subject of the email.
电子邮件消息的内容。
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:
For example:
would embed the image attached to the email with the Content IDmap.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 aTempPathnameCreator/FeatureWritercombination.
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, aMIME typecan be specified. For most situations, autodetect is the best and most robust option, but specific MIME types can also be set.
Service
The type of email service you would like to connect to. The options areGeneric SMTP, which requires that you specify the connection parameters and optionally authenticate with a username and password; andGmail, which lets you use a new or existing connection to Gmail.
Connection
The connection parameters available depend on the value of theEmail Serviceparameter. Parameters for eachEmail Serviceare 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 areNone(no security),TLS(Transport Layer Security), andSSL(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
Sender Authentication
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 theGoogle Gmailservice, or you could create a new service based on it. See theWeb Connectionsdocumentation 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
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:
AmazonSimple Email Service(SES):
Parameter |
Value |
---|---|
Host | email-smtp. |
Port | 587 |
Encryption | TLS |
Sender Authentication | Yes |
Sender's Username | |
Sender's Password |
Substitute your region for
Google Gmail:
Parameter |
Value |
---|---|
Host | smtp.gmail.com |
Port | 587 |
Encryption | TLS |
Sender Authentication | Yes |
Sender's Username | |
Sender's Password |
Note that using Gmail to send SMTP messages requires you to have to disable security on your Gmail account by following the instructions athttps://www.google.com/settings/security/lesssecureappsand therefore is not recommended. Using theGmailoption for theEmail Serviceparameter is preferred, since this will authenticate using OAuth 2.0, as recommended by Google.
Insecure Relay:
Parameter |
Value |
---|---|
Host | |
Port | 25 |
Encryption | None |
Sender Authentication | No |
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.
Usage Notes
This transformer is often used to notify recipients of translation status. It is often used downstream from theFeatureWriterto either send statistics of the translation, or in fact the output of the translation, via email. TheTempPathnameCreatortransformer 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, clickbeside the applicable parameter. For more information, seeTransformer Parameter Menu Options.
Defining Values
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.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
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. | |
Special Characters |
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和workspace-specific参数可能被使用。 | |
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.
Row Reordering |
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. |
Filter |
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 |
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh |
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note:并不是所有的工具都可以在所有变形金刚。
FME Community
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 theFME Community.