Browse the docs

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:

VariableWhat it holds
to, cc, bccThe addresses, as lists.
fromThe sending address.
subjectThe subject.
bodyThe text of the message.
attachmentsThe names of the attached files, as a list. Empty when there are none.
recipientsTextAll the addresses in one line, for checks such as "contains @work.com".
attachmentCountHow many files are attached.
recipientCountHow 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 #

ParameterTypeRequiredValuesWhat it does
intotextOptional. A variable that receives the whole draft.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Ask before replying to a big list
When
  1. Before ⌘↩ reaches Mail
Do
  1. Read the mail being written
  2. If {{ recipientCount }} is above “10”
  3. Ask “This goes to {{ recipientCount }}…” with “Send Anyway”
Open in Switchboard to try it

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