Send an email from an action. Delivery is over SMTP — configure it with an smtp
block, then set from, to (plus optional cc, bcc, reply_to), subject,
and an html or text body.
actions:
- name: SendWelcome
email:
smtp:
server: smtp.example.com
port: 587
user: a|secret::smtp_user|
pass: a|secret::smtp_pass|
from: hello@example.com
to: a|body::email|
subject: Welcome
html: "<h1>Welcome aboard</h1>"
Email
| Field | Type | Description |
|---|---|---|
aws_ses | boolean (nullable) | Send through AWS SES using the engine's AWS credentials instead of SMTP. Mutually exclusive with smtp in practice — set one or the other. |
smtp | EmailSmtp (nullable) | SMTP server to send through. Omit when using aws_ses. |
from | string | Required. Sender address. Must be one the SMTP server or SES identity is allowed to send as. |
reply_to | string (nullable) | Address replies should go to, when it differs from from. |
to | string | Required. Recipient. Comma-separate for several. |
cc | string (nullable) | Carbon copy recipients, comma-separated. |
bcc | string (nullable) | Blind carbon copy recipients, comma-separated. |
rows | string (nullable) | Batch mode. An interpolation ref resolving to a JSON array of row objects (e.g. a|Fired|). When set, one email is sent per row: each row's string fields to / subject /… |
subject | string | Required. Subject line. Interpolation applies. |
header | string (nullable) | Extra raw headers to attach to the message. |
html | string (nullable) | HTML body. Send html, text, or both — both is the polite form, since a client that cannot render HTML falls back to the text part. |
text | string (nullable) | Plain-text body. |
params | Array<string> (nullable) | Positional values substituted into the body, for templates that use placeholders rather than interpolation refs. |
attachments | Array<EmailAttachment> (nullable) | Files to attach. Turns the message into a multipart/mixed — the html/text body stays the first part and each attachment follows. Example ↓ |
success_message | string (nullable) | |
error_message | string (nullable) |
Field examples
attachments
Files to attach. Turns the message into a multipart/mixed — the html/text
body stays the first part and each attachment follows.
Example
attachments:
- filename: signups.csv
content: a|BuildCsv::csv_b64| # base64 (see `b64_encode`)
content_type: text/csv
EmailSmtp
| Field | Type | Description |
|---|---|---|
user | string | Required. |
pass | string | Required. |
server | string | Required. |
port | number (nullable) | |
tls | boolean (nullable) |