send_email
Send an email using the system mail command.
The body is piped to stdin, equivalent to:
echo "body" | mail -s "subject" [email protected]
Usage
@send_email to="<address(es)>" subject="<subject>" [body="<text>"] [cc="<address(es)>"] [bcc="<address(es)>"]
Examples
@send_email to="[email protected]" subject="Hello" body="Hi there"- Send a simple email@send_email to="[email protected],[email protected]" subject="Report" body="..."- Send to multiple recipients@send_email to="[email protected]" subject="FYI" body="..." cc="[email protected]"- With cc@send_email to="[email protected]" subject="FYI" body="..." bcc="[email protected]"- With bcc
Parameters
| Parameter | Type | Description |
|---|---|---|
to |
string | Required. Recipient address(es), comma-separated |
subject |
string | Required. Email subject |
body |
string | Email body text, sent via stdin (default: empty) |
cc |
string | Cc address(es), comma-separated |
bcc |
string | Bcc address(es), comma-separated |
Notes
- Requires the
- Requires a mail transfer agent (sendmail / postfix) to be configured for delivery
- Not available on Windows
- Addresses are validated: option-like values (e.g.
-b) are rejected- Arguments are passed as a list, never through a shell