mail:send

Delivers one message through whichever connection answers the mail:send capability.

Options

NameTypeDescription
connectionstringThe connection id to send with; empty resolves the only connection answering mail:send
fromstringThe sender address; defaults to the connection's account
to[]stringThe recipient addresses
cc[]stringThe carbon-copy addresses
bcc[]stringThe blind-carbon-copy addresses
subjectstringThe message subject
textstringThe text/plain body
htmlstringThe text/html body; set together with text for a multipart message

Outputs

NameTypeDescription
okboolWhether the message was accepted for delivery
fromstringThe 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 }}"