#
send-email
Send events as email messages. The event payload becomes the email body. Supports authenticated and unauthenticated SMTP. Waits for all inflight emails before shutting down.
If any of to(), from(), or subject() do not return a truthy value, then no email is sent.
#
Config
Required:
host: SMTP server hostnameto: Function that returns recipient email addressfrom: Function that returns sender email addresssubject: Function that returns email subject
Optional:
port(number): SMTP port (default: 587)user(string): SMTP usernamepassword(string): SMTP password
#
Example
pipeline:
send-email:
config:
host: smtp.example.com
port: 587
user: logbus
password: secret
to: !!js/function >-
function(event) {
return event.email
}
from: !!js/function >-
() => 'LogBus <logbus@tfks.net>'
subject: !!js/function >-
() => 'LogBus ❤️ SMTP'