# 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. !!!info If any of to(), from(), or subject() do not return a truthy value, then no email is sent. !!! ## Config **Required:** - `host`: SMTP server hostname - `to`: Function that returns recipient email address - `from`: Function that returns sender email address - `subject`: Function that returns email subject **Optional:** - `port` (number): SMTP port (default: 587) - `user` (string): SMTP username - `password` (string): SMTP password ## Example ```yaml 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 ' subject: !!js/function >- () => 'LogBus ❤️ SMTP' ```