Read the mail being written
Reads the message being written in Mail's front compose window: who it is to, from whom, the subject, the body and the attachments.
Read the mail being written into into
Details #
Reads the message you are writing in Mail, without changing it. The step leaves these variables, and its output holds the same as one object:
| Variable | What it holds |
|---|---|
to, cc, bcc | The addresses, as lists. |
from | The sending address. |
subject | The subject. |
body | The text of the message. |
attachments | The names of the attached files, as a list. Empty when there are none. |
recipientsText | All the addresses in one line, for checks such as "contains @work.com". |
attachmentCount | How many files are attached. |
recipientCount | How many addresses are in to, cc and bcc together. |
Give it an into name and the whole draft is also kept as one object in that variable.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
into | text | Optional. A variable that receives the whole draft. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Before ⌘↩ reaches Mail
- Read the mail being written
- If {{ recipientCount }} is above “10”
- Ask “This goes to {{ recipientCount }}…” with “Send Anyway”
Gotchas #
It reads the compose window that is in front. With no message being written the step fails with that reason.
If Mail will not say whether there are attachments, the step fails; it does not guess "none".
Dry run. Mail is not read. The step answers with a sample draft.
See also #
Before a key, click or quit, Ask Send anyway? (guardrail), Guardrails: check before it happens