SMTP Valve
Configuration reference for the SMTP Valve Pipes valve and its supported options.
Use this valve to send html/plain messages via SMTP.
Prerequisites
Section titled “Prerequisites”Before using this valve the SmtpClient module must be configured and deployed.
Configuration
Section titled “Configuration”| Name | Description | Default | Mandatory | Expanded |
|---|---|---|---|---|
smtp_destination | ID of the internal SMTP client used to talk with the SMTP backend. | "default" | ||
message_template | Path to a message template file. The text in the template supports expansion. See Message Template example | N/A | ||
subject | Mail subject. | N/A | ||
mail_from | FROM email address. | N/A | ||
mail_to | TO email address. | N/A | ||
mail_cc | CC email address. | N/A | ||
mail_bcc | BCC email address. | N/A | ||
remove_prefixes | Array containing prefixes to be removed from email addresses. | N/A | ||
file_attachment | Path to file. | N/A | ||
ignore_smtp_timeout | If true, a local SMTP timeout is logged and ignored, and the valve resolves successfully.When false, a local SMTP timeout fails the valve and pipe. | false |
//Example when sending to 1 to-address.{ "name": "SendMail", "enabled": true, "config": { "smtp_destination": "default", "subject_parameter": "My Subject", "message_template": "C:\\Windows\\Templates\\mail_template.txt", "mail_to": "${item.mail}", "file_attachment": "${item.attachment_path}", "remove_prefixes": ["SMTP:","sip:"] }}
//Example when sending to 1 to-address and multiple//cc-adresses stored as multi value.{ "name": "SendMail", "enabled": true, "config": { "smtp_destination": "default", "subject_parameter": "My Subject", "message_template": "C:\\Windows\\Templates\\mail_template.txt", "mail_to": "${item.mail}", "mail_cc": "@json:${item.cc.all}", "file_attachment": "${item.attachment_path}", "remove_prefixes": ["SMTP:","sip:"] }}
//Example when sending to multiple hard coded to-addresses.{ "name": "SendMail", "enabled": true, "config": { "smtp_destination": "default", "subject_parameter": "My Subject", "message_template": "C:\\Windows\\Templates\\mail_template.txt", "file_attachment": "${item.attachment_path}", "remove_prefixes": ["SMTP:","sip:"] }}Message Template example
Section titled “Message Template example”Property expansion is supported with {{...}} syntax. All available item and exports properties can be used in the template. In the example below the item property generated_otp_value is generated prior in the pipe.
<html><body>Your one time password is <b>{{item.generated_otp_value}}</b></body></html>