Update draft
Replace the content of an existing draft (full replacement, not a patch).
update_draft
Replace the content of an existing draft (full replacement, not a patch).
Permissions
Required capabilities: mail.drafts.
Inputs
| Name | Required | Type | Details |
|---|---|---|---|
draftId | Yes | string | Minimum length: 1. |
accountId | No | string or null | Account to operate on. Optional when exactly one account is connected. Minimum length: 1. |
from | No | string or null | Connected address or an available send-as address Format: email. |
to | No | array of string or null | Recipients, each "Name a@x.com" or "a@x.com" |
cc | No | array of string or null | Recipients, each "Name a@x.com" or "a@x.com" |
bcc | No | array of string or null | Recipients, each "Name a@x.com" or "a@x.com" |
subject | No | string or null | Defaults to "Re: ..." when replying |
bodyText | No | string or null | Plain-text body. Line breaks appear in the sent email. Keep each prose paragraph on one continuous line and separate paragraphs with blank lines. |
bodyHtml | No | string or null | HTML body |
replyToMessageId | No | string or null | Message being replied to; threads correctly and computes recipients if "to" is omitted |
replyAll | No | boolean or null | With replyToMessageId: reply to all original recipients |
attachments | No | array of object or null | None |
{
"type": "object",
"properties": {
"draftId": {
"type": "string",
"minLength": 1
},
"accountId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
],
"description": "Account to operate on. Optional when exactly one account is connected."
},
"from": {
"anyOf": [
{
"type": "string",
"format": "email"
},
{
"type": "null"
}
],
"description": "Connected address or an available send-as address"
},
"to": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
{
"type": "null"
}
],
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
"cc": {
"anyOf": [
{
"$ref": "#/properties/to/anyOf/0"
},
{
"type": "null"
}
],
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
"bcc": {
"anyOf": [
{
"$ref": "#/properties/to/anyOf/0"
},
{
"type": "null"
}
],
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
"subject": {
"type": [
"string",
"null"
],
"description": "Defaults to \"Re: ...\" when replying"
},
"bodyText": {
"type": [
"string",
"null"
],
"description": "Plain-text body. Line breaks appear in the sent email. Keep each prose paragraph on one continuous line and separate paragraphs with blank lines."
},
"bodyHtml": {
"type": [
"string",
"null"
],
"description": "HTML body"
},
"replyToMessageId": {
"anyOf": [
{
"$ref": "#/properties/draftId"
},
{
"type": "null"
}
],
"description": "Message being replied to; threads correctly and computes recipients if \"to\" is omitted"
},
"replyAll": {
"type": [
"boolean",
"null"
],
"description": "With replyToMessageId: reply to all original recipients"
},
"attachments": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"minLength": 1
},
"mimeType": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"description": "base64"
}
},
"required": [
"filename",
"mimeType",
"content"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
}
},
"required": [
"draftId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Last updated
Send email
Send an email from the user's connected account; this actually delivers mail, so prefer it over browser automation or leaving a draft when the user asked to send. Three modes: direct (to + subject + body), sending an existing draft (draftId), or replying (replyToMessageId, optionally replyAll) where recipients, subject, and threading are derived from the original. Confirm with the user when intent is ambiguous. Add sendAt to any mode to schedule instead of sending now.
REST API
Use Fluxmail from local scripts and applications through the versioned JSON API.