Submit message for delivery
Submit message for delivery. If reference message ID is provided then EmailEngine adds all headers and flags required for a reply/forward automatically.<br/><br/>Delivery is asynchronous. A 2xx means the message was queued, not that it was sent. Failed attempts are retried with exponential backoff up to the configured deliveryAttempts; follow the outcome through the Outbox endpoints or the messageSent, messageDeliveryError and messageFailed webhooks.<br/><br/>For SMTP accounts EmailEngine uploads the sent message to the Sent Mail folder after delivery. Gmail API and MS Graph accounts file sent messages themselves, so no upload is performed.
Request
- Base URL: https://your-emailengine-host
- URL: https://your-emailengine-host/v1/account/{account}/submit
- Auth: HTTP bearer
Path parameters
Unique identifier for the email account
Query parameters
For MS Graph accounts: send as structured JSON instead of raw MIME
Headers
Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect
Unique key to prevent duplicate processing of the same request
Request body
Example request
{
"to": [
{
"name": "Nyan Cat",
"address": "nyan.cat@example.com"
}
],
"subject": "What a wonderful message!",
"text": "Hello from myself!",
"html": "<p>Hello from myself!</p>",
"attachments": [
{
"filename": "transparent.gif",
"content": "R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",
"contentType": "image/gif"
}
]
}Response
Returns the queue ID the message was accepted under. Delivery happens asynchronously - a 200 means queued, not sent.
Example response
{
"response": "Queued for delivery",
"messageId": "<a2184d08-a470-fec6-a493-fa211a3756e9@example.com>",
"queueId": "d41f0423195f271f",
"sendAt": "2021-07-08T07:06:34.336Z",
"reference": {
"message": "AAAAAQAACnA",
"threadId": "1694936993596975454",
"success": true,
"error": "Referenced message was not found"
},
"preview": "Q29udGVudC1UeXBlOiBtdWx0aX...",
"idempotency": {
"key": "submit-12345",
"status": "MISS"
},
"mailMerge": [
{
"success": true,
"to": {
"name": "Andris 2",
"address": "andris@ethereal.email"
},
"messageId": "<19b9c433-d428-f6d8-1d00-d666ebcadfc4@ekiri.ee>",
"queueId": "1812477338914c8372a",
"sendAt": "2021-07-08T07:06:34.336Z"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.