CLI: Sending
The commands of the doorman command line under Sending. New messages and replies from an inbox, with idempotent retries.
doorman inboxes send
doorman inboxes send <inboxId> [flags]Sends inboxes.send: POST /v1/inboxes/{inboxId}/send
Send a message or reply. Access any: any API key, or a console session. An app token needs mail:send and mail:read.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--idempotency-keystringoptional1 to 255 printable ASCII characters. For 24 hours the same key with the same request replays the original answer with
Idempotent-Replayed: true; the same key with a different request is refused with 422idempotency_key_reused; a key whose first attempt is still running answers 409idempotency_in_progress; a failed send releases the key.--tostring | string[]optionalRecipients. Optional on a reply, where it defaults to the last inbound message's Reply-To or sender.
--ccstring | string[]optional--bccstring | string[]optional--reply-tostringoptionalThe address replies should go to instead of the inbox.
--subjectstringoptionalRequired on a new message. A reply defaults to
Re: <thread subject>.--textstringoptionalThe plain-text body.
--htmlstringoptionalThe HTML body. Text is derived from it when
textis absent.--bodystringoptionalA convenience: treated as HTML when it looks like HTML, as text otherwise. Ignored when
textorhtmlis given.--thread-idstringoptionalA thread id (thr_...). Makes the message a reply in this thread: threading headers, the default subject and recipient, and the quoted previous message come from it. An unknown, foreign or trashed thread answers 404
thread_not_found.--include-quotebooleanoptionalOn a reply, quote the previous message under the text. Defaults to true.
--attachmentsobject[]optional--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman inboxes send inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
--to sam@example.com \
--subject Thursday \
--text 'Thursday works.'doorman inboxes drafts create
doorman inboxes drafts create <inboxId> [flags]Sends inboxes.drafts.create: POST /v1/inboxes/{inboxId}/drafts
Write a draft for the owner to send. Access key: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused. An app token needs mail:draft and mail:read.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--tostring | string[]optionalRecipients. Optional on a reply, where it defaults to the last inbound message's Reply-To or sender.
--ccstring | string[]optional--bccstring | string[]optional--reply-tostringoptionalThe address replies should go to instead of the inbox.
--subjectstringoptionalRequired on a new message. A reply defaults to
Re: <thread subject>.--textstringoptionalThe plain-text body.
--htmlstringoptionalThe HTML body. Text is derived from it when
textis absent.--bodystringoptionalA convenience: treated as HTML when it looks like HTML, as text otherwise. Ignored when
textorhtmlis given.--thread-idstringoptionalA thread id (thr_...). Makes the message a reply in this thread: threading headers, the default subject and recipient, and the quoted previous message come from it. An unknown, foreign or trashed thread answers 404
thread_not_found.--include-quotebooleanoptionalOn a reply, quote the previous message under the text. Defaults to true.
--attachmentsobject[]optional--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman inboxes drafts create inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
--to sam@example.com \
--subject Thursday \
--text 'Thursday works.'doorman drafts delete
doorman drafts delete <heldSendId> [flags]Sends drafts.delete: DELETE /v1/drafts/{heldSendId}
Take a draft back. Access key: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused. An app token needs mail:draft.
Flags
--held-send-idstringoptionalThe same as the argument
<heldSendId>, for a script that names everything.
doorman drafts delete hsd_01jc5f1a2b3c4d5e6f7g8h9j0k
