Skip to content

Send email from mailbox.

POST
/api/mailbox/{mailboxId}

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

mailboxId*
Typestring
Required

Request Body

JSON
{
"to": [
"string"
],
"cc": [
"string"
],
"bcc": [
"string"
],
"subject": "Testbetreff",
"body": "Inhalt der Email",
"attachments": [
{
"uuid": "uuid",
"filename": "Testdatei.jpg"
}
],
"replyEmailId": 0
}

Responses

Success.
JSON
{
"id": 0,
"mailboxId": 0,
"mailboxFolder": 0,
"from": null,
"time": "string",
"subject": "string",
"body": "string",
"bodyHtml": "string",
"isRead": true,
"isAnswered": true
}
Authorization
api_key
Variables
Key
Value
mailboxId*
cURL
curl -X POST \
'http://localhost/api/mailbox/{mailboxId}' \
 --data '{
  "to": [
    "string"
  ],
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "subject": "Testbetreff",
  "body": "Inhalt der Email",
  "attachments": [
    {
      "uuid": "uuid",
      "filename": "Testdatei.jpg"
    }
  ],
  "replyEmailId": 0
}'

Samples

cURL
curl -X POST http://localhost/api/mailbox/{mailboxId}
JavaScript
fetch("http://localhost/api/mailbox/{mailboxId}", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/mailbox/{mailboxId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("http://localhost/api/mailbox/{mailboxId}")
print(response.json())