sigildocs

(sigil jmap send)

(sigil jmap send) - JMAP Email Sending

Provides email composition and submission via JMAP Email/set and EmailSubmission/set methods (RFC 8621). Also handles Identity/get for sender identity discovery.

Exports

Get all sending identities for the account.

Returns a list of identity dicts, each containing id:, name:, email:, replyTo:, etc.

(define ids (jmap-identities client))
(dict-ref (car ids) email:)
; => "user@example.com"
jmap-send!variable

Send an email via JMAP.

Creates a draft email and submits it in a single request using back-references. On success, the sent email is automatically moved to the Sent mailbox via onSuccessUpdateEmail.

Keywords: identity-id: - Sending identity (required, from jmap-identities) from: - Sender address (string or dict) to: - Recipient(s) (string, list of strings, or list of dicts) cc: - CC recipient(s) (optional) bcc: - BCC recipient(s) (optional) subject: - Email subject line text-body: - Plain text body (optional) html-body: - HTML body (optional) in-reply-to: - Message-ID being replied to (optional) references: - Message-ID references (optional)

Returns the submission result dict.

(jmap-send! client
  identity-id: (dict-ref (car (jmap-identities client)) id:)
  from: "me@example.com"
  to: "friend@example.com"
  subject: "Hello from Sigil"
  text-body: "This is a test email.")