Upload message
Upload a message structure, compile it into an EML file and store it into selected mailbox.<br/><br/>For MS Graph accounts only drafts can be uploaded, and the draft flag cannot be changed afterwards.<br/><br/>For Gmail API accounts the flags and internalDate fields are ignored. The message is inserted with the target label only, and its internal date is taken from the Date header of the message itself.
Request
- Base URL: https://your-emailengine-host
- URL: https://your-emailengine-host/v1/account/{account}/message
- Auth: HTTP bearer
Path parameters
Unique identifier for the email account
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
Request body
Example request
{
"path": "INBOX",
"flags": [
"\\Seen",
"\\Draft"
],
"internalDate": "2021-07-08T07:06:34.336Z",
"reference": {
"message": "AAAAAQAACnA",
"action": "reply",
"messageId": "<test123@example.com>",
"threadId": "1694936993596975454"
},
"raw": "TUlNRS1WZXJzaW9uOiAxLjANClN1YmplY3Q6IGhlbGxvIHdvcmxkDQoNCkhlbGxvIQ0K",
"from": {
"name": "From Me",
"address": "sender@example.com"
},
"to": [
{
"address": "recipient@example.com"
}
],
"cc": [
{
"name": "Some Name",
"address": "user@example.com"
}
],
"bcc": [
{
"name": "Some Name",
"address": "user@example.com"
}
],
"subject": "What a wonderful message",
"text": "Hello from myself!",
"html": "<p>Hello from myself!</p>",
"attachments": [
{
"filename": "transparent.gif",
"contentType": "image/gif",
"cid": "unique-image-id@localhost",
"reference": "AAAAAQAACnAcde",
"content": "R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs="
}
],
"messageId": "<test123@example.com>",
"headers": {
"X-My-Custom-Header": "Custom header value"
},
"locale": "fr",
"tz": "Europe/Tallinn"
}Response
Returns the uploaded message with the identifiers the provider assigned to it.
Example response
{
"id": "AAAAAgAACrI",
"path": "INBOX",
"uid": 12345,
"uidValidity": "12345",
"seq": 12345,
"messageId": "<test123@example.com>",
"reference": {
"message": "AAAAAQAACnA",
"threadId": "1694936993596975454",
"success": true,
"error": "Referenced message was not found"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.