Read the selected mail
Reads the message selected in Mail: its subject, who sent it, when it arrived, and a link that opens it again.
Read the selected mail into into
Examples #
- Press ⌃⌥M
- Read the selected mail
- Show a notification “{{ subject }}”
- Press ⌃⌥M
- Read the selected mail → message
- Copy “{{ message.link }}” to the clipboard
Details #
Reads the message that is selected in Mail, without changing it. When several are selected, it reads the first one. The step leaves these variables, and its output holds the same as one record:
| Variable | What it holds |
|---|---|
subject | The subject. Empty when the message has none. |
sender | Who sent it, as Mail shows it: Maya Lin <[email protected]>. |
senderName | Just the name: Maya Lin. Empty when the message only has an address. |
senderAddress | Just the address: [email protected]. |
date | When it arrived, as an ISO 8601 date in your time zone. Use formatDate(date, "medium") to write it for people. |
messageId | The message's Message-ID, without the angle brackets. |
link | A message:// link. Opening it shows the message in Mail, so put it in a to-do, a note or an event. |
selectedCount | How many messages were selected. |
Give it an into name and the whole message is also kept as one record in that variable.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
into | text | Optional. A variable that receives the whole message. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Gotchas #
It reads what is selected in Mail's viewer window, wherever Mail is on screen. It never opens Mail: with Mail closed, the step fails and says so.
With no message selected, the step fails with "No message is selected in Mail." Use
onFailure: branchto tell the person instead of stopping.Dry run. Mail is not read. The step answers with a sample message ("Quarterly report" from Maya Lin), so the steps after it get real-looking values.
See also #
Set mail status, Read the mail being written, Get the current thing, App Kits