Skip to main content

PutEmail

Description

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

Tags

email, notify, put, smtp

Properties

In the list below required Properties are shown with an asterisk (*). Other properties 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 Hostname *SMTP HostnameThe hostname of the SMTP host

Supports Expression Language, using FlowFile attributes and Environment variables.
SMTP Port *SMTP Port25The Port used for SMTP communications

Supports Expression Language, using FlowFile attributes and Environment variables.
Authorization Mode *authorization-modeUse Password
  • Use Password
  • Use OAuth2
How to authorize sending email on the user's behalf.
OAuth2 Access Token Provider *oauth2-access-token-providerController Service:
OAuth2AccessTokenProvider

Implementations:
StandardOauth2AccessTokenProvider
OAuth2 service that can provide access tokens.

This property is only considered if:
  • the property Authorization Mode has a value of oauth-based-authorization-mode
SMTP UsernameSMTP UsernameUsername for the SMTP account

Supports Expression Language, using FlowFile attributes and Environment variables.
SMTP PasswordSMTP PasswordPassword for the SMTP account

Supports Expression Language, using FlowFile attributes and Environment variables.

This property is only considered if:
  • the property Authorization Mode has a value of password-based-authorization-mode
SMTP Auth *SMTP AuthtrueFlag indicating whether authentication should be used

Supports Expression Language, using FlowFile attributes and Environment variables.
SMTP STARTTLS *SMTP TLSfalseFlag indicating whether Opportunistic TLS should be enabled using STARTTLS command

Supports Expression Language, using FlowFile attributes and Environment variables.
SMTP Socket Factory *SMTP Socket Factoryjavax.net.ssl.SSLSocketFactorySocket Factory to use for SMTP Connection

Supports Expression Language, using FlowFile attributes and Environment variables.
SMTP X-Mailer Header *SMTP X-Mailer HeaderNiFiX-Mailer used in the header of the outgoing email

Supports Expression Language, using FlowFile attributes and Environment variables.
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 Type *Content Typetext/plainMime Type used to interpret the contents of the email, such as text/plain or text/html

Supports Expression Language, using FlowFile attributes and Environment variables.
From *FromSpecifies the Email address to use as the sender. Comma separated sequence of addresses following RFC822 syntax.

Supports Expression Language, using FlowFile attributes and Environment variables.
ToToThe recipients to include in the To-Line of the email. Comma separated sequence of addresses following RFC822 syntax.

Supports Expression Language, using FlowFile attributes and Environment variables.
CCCCThe recipients to include in the CC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.

Supports Expression Language, using FlowFile attributes and Environment variables.
BCCBCCThe recipients to include in the BCC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.

Supports Expression Language, using FlowFile attributes and Environment variables.
Reply-ToReply-ToThe recipients that will receive the reply instead of the from (see RFC2822 §3.6.2).This feature is useful, for example, when the email is sent by a no-reply account. This field is optional.Comma separated sequence of addresses following RFC822 syntax.

Supports Expression Language, using FlowFile attributes and Environment variables.
Subject *SubjectMessage from NiFiThe email subject

Supports Expression Language, using FlowFile attributes and Environment variables.
MessageMessageThe body of the email message

Supports Expression Language, using FlowFile attributes and Environment variables.
Flow file content as message *email-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, using FlowFile attributes and Environment variables.
Input Character Set *input-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 File *Attach Filefalse
  • true
  • false
Specifies whether or not the FlowFile content should be attached to the email
Include All Attributes In Message *Include 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

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: Yes, evaluated using FlowFile Attributes and Environment variables.

Relationships

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

Reads Attributes

This processor does not read attributes.

Writes Attributes

This processor does not write attributes.

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

ScopeDescription
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.

See Also