Fluxmail

Create draft

Create a draft. For a reply draft, pass replyToMessageId (recipients/subject are derived; replyAll for reply-all).

create_draft

Create a draft. For a reply draft, pass replyToMessageId (recipients/subject are derived; replyAll for reply-all).

Permissions

Required capabilities: mail.drafts.

Inputs

NameRequiredTypeDetails
accountIdNostringAccount to operate on. Optional when exactly one account is connected. Minimum length: 1.
toNoarray of stringRecipients, each "Name a@x.com" or "a@x.com"
ccNoarray of stringRecipients, each "Name a@x.com" or "a@x.com"
bccNoarray of stringRecipients, each "Name a@x.com" or "a@x.com"
subjectNostringDefaults to "Re: ..." when replying
bodyTextNostringPlain-text body
bodyHtmlNostringHTML body
replyToMessageIdNostringMessage being replied to; threads correctly and computes recipients if "to" is omitted Minimum length: 1.
replyAllNobooleanWith replyToMessageId: reply to all original recipients
attachmentsNoarray of objectNone
{
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "minLength": 1,
      "description": "Account to operate on. Optional when exactly one account is connected."
    },
    "to": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
    },
    "cc": {
      "$ref": "#/properties/to",
      "description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
    },
    "bcc": {
      "$ref": "#/properties/to",
      "description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
    },
    "subject": {
      "type": "string",
      "description": "Defaults to \"Re: ...\" when replying"
    },
    "bodyText": {
      "type": "string",
      "description": "Plain-text body"
    },
    "bodyHtml": {
      "type": "string",
      "description": "HTML body"
    },
    "replyToMessageId": {
      "type": "string",
      "minLength": 1,
      "description": "Message being replied to; threads correctly and computes recipients if \"to\" is omitted"
    },
    "replyAll": {
      "type": "boolean",
      "description": "With replyToMessageId: reply to all original recipients"
    },
    "attachments": {
      "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
      }
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Last updated

On this page