gmail_send
Send new Gmail emails with optional Cc, Bcc, attachments, From alias, or scheduled delivery. Recipients are verified before sending; immediate undo can recall a message.
Instructions
Send a new e-mail (any Unicode text) with optional Cc, Bcc, attachments, From alias, or schedule it.
The account's signature is added after the body by Gmail (signature=false removes it). Recipients are verified on the compose screen before sending; on any mismatch nothing is sent. Scheduled mail waits in the 'Scheduled' folder (gmail.scheduled, gmail.cancel_scheduled).
Send is never repeated blind: when Gmail's reaction to Send is unclear the mail is looked up in Outbox / Sent; if that cannot tell, the op fails with error 'send_state_unknown' and nothing is re-sent (check gmail.list folder='sent' before any retry). A result may carry verified_in='outbox' | 'sent' when the send was confirmed that way; a scheduled send counts only once Gmail confirms it or it is found in 'Scheduled' (verified_in='scheduled').
Gmail offers 'Undo' for about 7 s after 'Sent' (undo_available tells whether it was still on screen when the op returned; gmail.undo uses it). undo=true taps that Undo within this op, the moment Gmail shows it: the result then has undone='send' and saved_as_draft=true only when the mail came back as a draft and is not in Outbox / Sent; undone=false (with undo_error) means it was sent anyway.
Requires confirm=true (outward-facing or destructive).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Cc addresses. | |
| to | Yes | Recipient addresses. | |
| bcc | No | Bcc addresses. | |
| body | No | Plain-text body (newlines allowed). | |
| undo | No | Recall the mail with Gmail's 'Undo' right after sending (it comes back as a draft and is not delivered); not with schedule. | |
| confirm | No | Must be true: this action is outward-facing or destructive. | |
| subject | No | Subject line. | |
| schedule | No | Send later instead of now: 'YYYY-MM-DD HH:MM' (24h, the phone's time zone) or a preset offered by Gmail's Schedule send dialog ('tomorrow morning', 'tomorrow afternoon', 'monday morning', ...). | |
| signature | No | Keep the signature Gmail appends after the body. | |
| attachments | No | Paths of files on this computer to attach (pushed to the phone first). | |
| drive_files | No | Google Drive files to insert as links: 'name' (found with Drive search) or '/Folder/name' (from My Drive). If a recipient has no access Gmail asks about sharing: the mail is then kept as a draft and an error is returned (share it with drive.share, then gmail.send_draft). | |
| from_address | No | Send from this address (an alias / delegated address of the account). |