Save a draft
add_draftSave an email to the account's Drafts folder without sending it, for the user to review, edit and send from their mail client. Pass in_reply_to to thread a reply under the email it answers, and attachment_ids to attach files: from stage_attachment_from_email for a file already in an email, or prepare_attachment_upload for one on disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Carbon-copy recipients, in the same form as `to` | |
| to | Yes | Recipients, e.g. ["alice@example.com", "Bob Smith <bob@example.com>"] | |
| bcc | No | Blind-copy recipients, in the same form as `to` | |
| body | Yes | Plain-text body | |
| Yes | The account to write from, as listed by list_accounts. It is also the From address. | ||
| subject | Yes | Subject line. For a reply, the original subject prefixed with "Re: ". | |
| in_reply_to | No | The email this one replies to. Threads the new message under it in every mail client. The original's text is not added: `body` is the whole of what is sent. | |
| attachment_ids | No | Files to attach, each an attachment_id from stage_attachment_from_email (a file already in an email) or prepare_attachment_upload (a file uploaded). At most 10, together within 25 MB once encoded for email. Each can be used once: once the email is saved or sent, its files are deleted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | No | The draft's UID in that folder, when the server reports it. | |
| mailbox | Yes | The Drafts folder the draft was saved to. | |
| message_id | Yes | The draft's Message-ID header. | |
| attachments | Yes | The files attached to it, in order. |