Sending
Sending new messages, replies and forwards with attachments.
| Method | Path | Summary |
|---|---|---|
| POST | /api/send | Send a message |
#Send a message
POST
/api/sendmultipart/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_idcookies from Bramble sign-in).
Licence: Mail.
Request body
multipart/form-data with the file, plus these fields:
| Name | Type | Description |
|---|---|---|
from | any | The address to send from (yours, or a shared mailbox's you may send as). |
to | any | Recipients. |
cc | any | Copy recipients. |
bcc | any | Blind copy recipients. |
html | any | The message body (HTML). |
subject | any | The subject. |
inReplyTo | any | The message being replied to (for threading). |
references | array of any | |
answeredUid | number | |
answeredFolder | any | |
answeredMb | any |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean | |
savedTo | any |
Example response
JSON
{
"ok": true,
"savedTo": null
}Errors
| Status | Message |
|---|---|
| 403 | You can't send from that address |
| 400 | Add someone to send it to |
| 400 | Too many recipients |
| 502 | The 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();Was this page helpful?
Thanks for your feedback.