PutEmail

Description:

Sends an e-mail to configured recipients for each incoming FlowFile

Additional Details...

Tags:

email, put, notify, smtp

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
SMTP HostnameSMTP HostnameThe hostname of the SMTP host
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SMTP PortSMTP Port25The Port used for SMTP communications
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Authorization Modeauthorization-modeUse Password
  • Use Password Use password
  • Use OAuth2 Use OAuth2 to acquire access token
How to authorize sending email on the user's behalf.
OAuth2 Access Token Provideroauth2-access-token-providerController Service API:
OAuth2AccessTokenProvider
Implementation: StandardOauth2AccessTokenProvider
OAuth2 service that can provide access tokens.

This Property is only considered if the [Authorization Mode] Property has a value of "Use OAuth2".
SMTP UsernameSMTP UsernameUsername for the SMTP account
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SMTP PasswordSMTP PasswordPassword for the SMTP account
Sensitive Property: true
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [Authorization Mode] Property has a value of "Use Password".
SMTP AuthSMTP AuthtrueFlag indicating whether authentication should be used
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SMTP STARTTLSSMTP TLSfalseFlag indicating whether Opportunistic TLS should be enabled using STARTTLS command
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SMTP Socket FactorySMTP Socket Factoryjavax.net.ssl.SSLSocketFactorySocket Factory to use for SMTP Connection
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SMTP X-Mailer HeaderSMTP X-Mailer HeaderNiFiX-Mailer used in the header of the outgoing email
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Attributes to Send as Headers (Regex)attribute-name-regexA Regular Expression that is matched against all FlowFile attribute names. Any attribute whose name matches the regex will be added to the Email messages as a Header. If not specified, no FlowFile attributes will be added as headers.
Content TypeContent Typetext/plainMime Type used to interpret the contents of the email, such as text/plain or text/html
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
FromFromSpecifies the Email address to use as the sender. Comma separated sequence of addresses following RFC822 syntax.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
ToToThe recipients to include in the To-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
CCCCThe recipients to include in the CC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
BCCBCCThe recipients to include in the BCC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SubjectSubjectMessage from NiFiThe email subject
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
MessageMessageThe body of the email message
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Flow file content as messageemail-ff-content-as-messagefalseSpecifies whether or not the FlowFile content should be the message of the email. If true, the 'Message' property is ignored.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Input Character Setinput-character-setUTF-8Specifies the character set of the FlowFile contents for reading input FlowFile contents to generate the message body or as an attachment to the message. If not set, UTF-8 will be the default value.
Attach FileAttach Filefalse
  • true
  • false
Specifies whether or not the FlowFile content should be attached to the email
Include All Attributes In MessageInclude All Attributes In Messagefalse
  • true
  • false
Specifies whether or not all FlowFile attributes should be recorded in the body of the email message

Dynamic Properties:

Supports Sensitive Dynamic Properties: Yes

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
mail.propertyNameValue for a specific property to be set in the JavaMail Session objectDynamic property names that will be passed to the Mail session. Possible properties can be found in: https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successFlowFiles that are successfully sent will be routed to this relationship
failureFlowFiles that fail to send will be routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

ResourceDescription
MEMORYThe entirety of the FlowFile's content (as a String object) will be read into memory in case the property to use the flow file content as the email body is set to true.