Sending

Sending new messages, replies and forwards with attachments.

MethodPathSummary
POST/api/sendSend a message

#Send a message

POST/api/send

multipart/form-data: the fields below plus any attachments as files.

Address
https://<your-org>.brambleit.cloud/mail/api/send
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Mail.

Request body

multipart/form-data with the file, plus these fields:

NameTypeDescription
fromanyThe address to send from (yours, or a shared mailbox's you may send as).
toanyRecipients.
ccanyCopy recipients.
bccanyBlind copy recipients.
htmlanyThe message body (HTML).
subjectanyThe subject.
inReplyToanyThe message being replied to (for threading).
referencesarray of any
answeredUidnumber
answeredFolderany
answeredMbany

Response 200

FieldTypeDescription
okboolean
savedToany
Example response
JSON
{
  "ok": true,
  "savedTo": null
}

Errors

StatusMessage
403You can't send from that address
400Add someone to send it to
400Too many recipients
502The mail server didn't accept it: …

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/send', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"from":"…","to":"…","cc":"…","bcc":"…","html":"…","subject":"…","inReplyTo":"…","references":[],"answeredUid":12.5,"answeredFolder":"…","answeredMb":"…"}),
});
const data = await res.json();