Workflow steps

mail.send

type: "mail.send"

Sends a message from one of the account's own addresses. It requires a human step upstream — there is no exception.

needs approval upstream5 recipientsbox required
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

A human step is required upstream

This acts outside the account, and a run has nobody to ask. The definition is refused when you save it unless a human step sits on the path that reaches this one.

boxstringrequired

The address that writes. It must be one of the account's.

tostring | string[]required

Five recipients at most.

ccstring | string[]

Copies.

subjectstringrequired

The subject.

textstring

Plain text.

htmlstring

Or HTML. One of the two is required.

{ id: "send", type: "mail.send", config: {
    box: "ops@example.com",
    to: "{{steps.approve.output.recipient}}",
    subject: "Weekly digest",
    text: "{{steps.write.output.text}}" } }
{"id": "send", "type": "mail.send", "config": {
    "box": "ops@example.com",
    "to": "{{steps.approve.output.recipient}}",
    "subject": "Weekly digest",
    "text": "{{steps.write.output.text}}"}}

Output

{{steps.send.output.accepted}}   // true
{{steps.send.output.from}}       // the address the recipient actually sees
{{steps.send.output.aligned}}    // whether it was signed with its own domain
"{{steps.send.output.accepted}}"   # True
"{{steps.send.output.from}}"       # the address the recipient actually sees
"{{steps.send.output.aligned}}"    # whether it was signed with its own domain

Accepted is not delivered

The relay hands back when the message is queued

What happens after that is not told to us. A chain that reports « sent » to someone is reporting that it was accepted — which is true, and is not the same thing.

The account must own the mailbox

There is no other way to send. A box that is not one of the account's addresses fails the step.