Send SMTP Email¶
Description¶
Use the Send Email Node to send an email via an SMTP connection to a recipient.
Settings¶
Email Service¶
Select the Email Provider of the address you want to send from. If yours is not listed, you can select Other SMTP Service to do a manual configuration.
Email Service Configuration
Some email providers, such as Gmail, will require you to configure your mail account to allow sending mail via SMTP before you can use it.
SMTP Settings¶
Depending on which Email Service selected above, you will be asked to either enter your login credentials for that service or for the full SMTP connection information in case you selected the "Other SMTP Service" option.
Recipient TO Email Addresses¶
Comma-separated list of email addresses to send the email to.
Email Subject¶
The subject of the email.
Email Content¶
The content of the email. The field supports basic rich text editing.
Authentication¶
You can use one of the following authentication methods:
OAuth2 is a token-based authentication method. It uses access tokens generated by the service provider to grant authorization for client applications to access user data. Access tokens are unique identifiers that contain user, client application, and permission information. They are short-lived and can be revoked if necessary, providing a higher level of security than Basic Auth. Email providers such as Google and Microsoft may use only OAuth2 for authentication.
To create a connection, follow these steps:
- Near the OAuth2 Parameters setting, click +.
- Add a new connection or use an existing one:
- Connection name — create a unique connection name.
- user — add your email address.
- clientId — add a registered client id of the application.
- clientSecret — add a registered client secret of the application.
- accessToken — add an access token. Required only if refreshToken is not available.
- refreshToken — add a refresh token. If it is provided, the Node tries to generate a new access token if existing one expires or fails.
- expiryDate — add an expiration Unix timestamp in milliseconds for the current
accessToken
. - accessUrl — add an HTTP endpoint for requesting new access tokens. This value defaults to Gmail
https://accounts.google.com/o/oauth2/token
. - tlsOption — specify one of the options if you want to connect with TLS:
- tls — is used by default. TLS is a separate protocol that operates on a different port (usually port 443 for HTTPS).
- starttls — is a command used to upgrade an existing insecure connection to a secure one within the same port.
- none — don't connect with TLS.
- Click Create.
Cognigy caches connections by default, and for OAuth2 connections, Cognigy also caches the refresh and access tokens. To update the refresh token or access token, create a snapshot.
Basic Auth is a simple authentication scheme where the client sends the user's credentials (username and password) to the server in the HTTP header. It's used for web applications requiring authentication and adds an Authorization header to the HTTP request. However, it has security limitations as the credentials are sent in clear text, and the server doesn't provide a way to log out.
To create a connection, follow these steps:
- Near the Basic Auth Parameters setting, click +.
- Add a new connection or use an existing one:
- Connection name — create a unique connection name.
- username — add a login that you obtained from your email provider.
- password — add a password that you obtained from your email provider.
- Click Create.
Attachments¶
By default, the No Attachment option is selected.
You can select the other email attachments:
Attachment | Description |
---|---|
From URL | You can specify a public Web URL or a data URL. The linked File will then be attached to that mail. You can also pick a custom filename for the attached file. |
From Text Content | You can define a text that should be sent as an attachment by selecting "From Text Content" as an option. |
From Base64 String | If you have Base64-encoded data that should be attached, you can do so by selecting the "From Base64 String" option. |
Custom Content Attachment | If you need to send text content with a specific MIME-Type, you can select "From Custom Content Type", allowing you to define an own MIME-Type |
From Pregenerated MIME Node | Allows to send a fully customized attachment body manually. |
Result Storage & Error Handling¶
Store location of SMTP Request result¶
Can be set to Don't store result (default), Input, or Context. If set to Input or Context, you can define a location for the result within Input or Context. The result of the sent mail response will then be put at that location.
Stop on Error¶
If switched on, the flow execution will halt in case the mail-sending fails.
Advanced¶
Custom From Email Address¶
This email address will be displayed in the "from" field (sender's address).
CC Email Addresses¶
The CC recipients of your email.
BCC Email Addresses¶
The BCC recipients of your email.
Reply To Address¶
This email address is the target for receiving mails when recipients reply to your email.
Define custom text Email Content¶
If your content contains non-text content, you can provide a customized text-only version of the mail content here for improved compatibility with limited devices.
Email Priority¶
You can use this option to set your priority to high
, normal
(default), or low
.
Execute Request asynchronous¶
If switched on, the flow execution will continue directly after the Send Email Node was triggered. If turned-off, flow execution will wait until the email is sent.