mail:send
Delivers one message through whichever connection answers the mail:send capability.
Options
| Name | Type | Description |
|---|---|---|
connection | string | The connection id to send with; empty resolves the only connection answering mail:send |
from | string | The sender address; defaults to the connection's account |
to | []string | The recipient addresses |
cc | []string | The carbon-copy addresses |
bcc | []string | The blind-carbon-copy addresses |
subject | string | The message subject |
text | string | The text/plain body |
html | string | The text/html body; set together with text for a multipart message |
Outputs
| Name | Type | Description |
|---|---|---|
ok | bool | Whether the message was accepted for delivery |
from | string | The sender address the message went out with |
Example
name: Send a report by mail
actions:
- name: report
component: storage:local:file:read
vars:
path: "{{ var.report_path }}"
- name: deliver
component: mail:send
vars:
to:
- "{{ var.recipient }}"
subject: Weekly report
text: "{{ report.content }}"
outputs:
sent: "{{ deliver.ok }}"