/mail/send
POST
/mail/send
const url = 'https://example.com/api/v1/mail/send';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":["example"],"cc":[],"bcc":[],"subject":"","text":"","html":"example","inReplyTo":"example","replyFolder":"example","replyUid":1,"draftUid":1,"uploads":[],"forwardParts":[]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/mail/send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": [ "example" ], "cc": [], "bcc": [], "subject": "", "text": "", "html": "example", "inReplyTo": "example", "replyFolder": "example", "replyUid": 1, "draftUid": 1, "uploads": [], "forwardParts": [] }'Send through Postfix submission as the mailbox, append to Sent, flag the replied message, drop the draft. rejected lists the recipients Postfix refused while accepting the rest. Refuses with 409 uploads_missing, sending nothing, when an upload id no longer resolves — uploads are held in memory, so an API restart loses them.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
to
required
Array<string>
cc
Array<string>
bcc
Array<string>
subject
string
text
string
html
string
inReplyTo
string
replyFolder
string
replyUid
integer
draftUid
integer
uploads
Array<string>
forwardParts
Array<object>
object
folder
required
string
uid
required
integer
part
required
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
messageId
required
string
sentFolder
required
string
uid
required
integer
rejected
required
Array<object>
object
address
required
string
reason
required
string
Examplegenerated
{ "messageId": "example", "sentFolder": "example", "uid": 1, "rejected": [ { "address": "example", "reason": "example" } ]}