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
accountIdNostring or nullAccount to operate on. Optional when exactly one account is connected. Minimum length: 1.
fromNostring or nullConnected address or an available send-as address Format: email.
toNoarray of string or nullRecipients, each "Name a@x.com" or "a@x.com"
ccNoarray of string or nullRecipients, each "Name a@x.com" or "a@x.com"
bccNoarray of string or nullRecipients, each "Name a@x.com" or "a@x.com"
subjectNostring or nullDefaults to "Re: ..." when replying
bodyTextNostring or nullPlain-text body. Line breaks appear in the sent email. Keep each prose paragraph on one continuous line and separate paragraphs with blank lines.
bodyHtmlNostring or nullHTML body
replyToMessageIdNostring or nullMessage being replied to; threads correctly and computes recipients if "to" is omitted Minimum length: 1.
replyAllNoboolean or nullWith replyToMessageId: reply to all original recipients
attachmentsNoarray of object or nullNone
{
  "type": "object",
  "properties": {
    "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": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "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"
        }
      ]
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Last updated

On this page