Messages

Messages

Send email: whole messages from your product, or a person’s own.

On this page
  1. messages send
  2. messages markUnread
  3. messages original
  4. messages star
  5. messages delete
  6. messages report
  7. messages unsubscribe
  8. messages submit
  9. messages submitMany
  10. messages cancel
  11. messages sendNow
  12. messages scheduled

mailset messages send

Send mail from one of your addresses. A reply (--thread-id) carries the message it answers under your text, as Gmail quotes it; --quote false sends it bare.

Flags

  • --from<from>required

    One of your addresses.

  • --text<text>required

    The message’s text.

  • --to<a,b,…>optional

    Who it goes to, up to 100 addresses.

    Or @<path>, to read the JSON from a file.

  • --cc<a,b,…>optional

    Who gets a copy, up to 100 addresses.

    Or @<path>, to read the JSON from a file.

  • --bcc<a,b,…>optional

    Who gets a copy the others don’t see, up to 100 addresses.

    Or @<path>, to read the JSON from a file.

  • --subject<subject>optional

    The subject, on one line.

  • --thread-id<thread-id>optional

    Answering this conversation.

  • --delay-seconds<n>optional

    Seconds to hold it so it can be taken back, 0 to 120.

    Default 0.

  • --send-at<n>optional

    Scheduled send: when, in ms since the epoch.

  • --draft-id<draft-id>optional

    The draft this came from. It goes once the mail has.

  • --markdownflagoptional

    text has bold, italic, lists, quotes or links to send as formatting.

  • --quoteflagoptional

    A reply carries the message it answers under the new text, added here at send time. False sends the new text alone.

  • --answering<answering>optional

    The conversation’s message this answers, for that quote: the newest that arrived unless given.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.send

Usage
mailset messages send --from <from> --text <text> [--to <a,b,…>] [--cc <a,b,…>] [--bcc <a,b,…>] [--subject <subject>] [--thread-id <thread-id>] [--delay-seconds <n>] [--send-at <n>] [--draft-id <draft-id>] [--markdown] [--quote] [--answering <answering>]
Example
mailset messages send --from moc.elpmaxe@ana --to moc.elpmaxe@airam --subject "Quote for March" --text "Hi Maria, the quote is attached."

mailset messages markUnread

Mark a conversation unread from this message on.

Flags

  • <id>argumentrequired

    The message’s id, from threads get.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.markUnread

Usage
mailset messages markUnread <id>
Example
mailset messages markUnread msg_91b7e4c2a6f03d58b1c4e7a9

mailset messages original

Get a message as it arrived, as an .eml file.

Flags

  • <id>argumentrequired

    The message’s id, from threads get.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.original

Usage
mailset messages original <id>
Example
mailset messages original msg_91b7e4c2a6f03d58b1c4e7a9

mailset messages star

Star one message, or take its star off.

Flags

  • <id>argumentrequired

    The message’s id, from threads get.

  • --starredflagoptional

    True to star it, false to take the star off.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.star

Usage
mailset messages star <id> [--starred]
Example
mailset messages star msg_91b7e4c2a6f03d58b1c4e7a9

mailset messages delete

Delete one message for good, with its files.

Passkey

Flags

  • <id>argumentrequired

    The message’s id, from threads get.

It can ask for your passkey. It prints “This needs your passkey. Open <link>”, then waits until the link is approved or refused. Read its output as it comes: through head or tail, the link shows only after the wait.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.delete

Usage
mailset messages delete <id>
Example
mailset messages delete msg_91b7e4c2a6f03d58b1c4e7a9

mailset messages report

Report one message as junk or phishing, and move it to Junk.

Flags

  • <id>argumentrequired

    The message’s id, from threads get.

  • --kindenumoptional

    junk or phishing.

    One ofjunkphishing

    Default junk.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.report

Usage
mailset messages report <id> [--kind junk|phishing]
Example
mailset messages report msg_91b7e4c2a6f03d58b1c4e7a9 --kind phishing

mailset messages unsubscribe

Unsubscribe from whoever sent a message: asked for you, or their page to open.

Flags

  • <id>argumentrequired

    The message’s id, from threads get.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.unsubscribe

Usage
mailset messages unsubscribe <id>
Example
mailset messages unsubscribe msg_91b7e4c2a6f03d58b1c4e7a9

mailset messages submit

Send a whole RFC 5322 message as written.

Flags

  • --file<path>required

    The file to send, read from this machine.

  • --transactionalflagoptional

    A product’s own mail: no copy in Sent, nobody added to contacts, and only the delivery log remembers it.

  • --modeenumoptional

    The kind of product mail. transactional: a code or a receipt, which can’t carry List-Unsubscribe or Precedence: bulk. promotional: a newsletter or an offer, to one address in To; with no List-Unsubscribe of its own, Mailset adds a one-click one and puts the link at {{mailset_unsubscribe}} in the body, or on a last line.

    One oftransactionalpromotional

  • --deliver-by<n>optional

    The latest it may go out, in milliseconds since 1970. Held past it at submit, it is refused with retryAt; still waiting when it comes, it is dropped unsent.

Returns

With --json it prints the Receipt object.

In the API: POST /v1/messages.submit

Usage
mailset messages submit --file <path> [--transactional] [--mode transactional|promotional] [--deliver-by <n>]
Example
mailset messages submit --file receipt.eml --transactional

mailset messages submitMany

Send up to 100 whole messages, each with its own answer.

Flags

  • --messages<json>required

    The messages, 1 to 100, each as messages submit takes one. 48 MB together, before base64.

    Or @<path>, to read the JSON from a file.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.submitMany

Usage
mailset messages submitMany --messages <json>
Example
mailset messages submitMany --messages @messages.json
messages.json
[
  {
    "data": "<the message as base64>",
    "transactional": true
  }
]

mailset messages cancel

Take back a message that hasn’t gone yet.

Flags

  • <id>argumentrequired

    The waiting message’s id, from messages send or messages scheduled.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.cancel

Usage
mailset messages cancel <id>
Example
mailset messages cancel out_2e8b6d1f4a9c3075d6b1e8a4

mailset messages sendNow

Send a message held for Undo now, without waiting out its time.

Flags

  • <id>argumentrequired

    The waiting message’s id, from messages send.

Returns

With --json it prints the Receipt object.

In the API: POST /v1/messages.sendNow

Usage
mailset messages sendNow <id>
Example
mailset messages sendNow out_2e8b6d1f4a9c3075d6b1e8a4

mailset messages scheduled

List mail waiting for its time.

Returns

With --json it prints what the API returns.

In the API: POST /v1/messages.scheduled

Usage
mailset messages scheduled
Example
mailset messages scheduled