Send a message
POST
/api/v1/mailbox/messages/sendSubmits through Postfix and files a copy in Sent. The From address is always the signed-in mailbox: submission is trusted-network rather than SASL-authenticated, so Postfix's own sender-login check is bypassed and this endpoint is the only thing preventing one mailbox sending as another. Replies (in_reply_to set) flag the original \Answered; forwards carry attachments over with forward_attachments_from + attachment_indexes. With send_at (ISO-8601) the message is stored in the Scheduled folder and sent at that time instead -- the response then carries send_at and the id it can be cancelled by.
Request
POST
/api/v1/mailbox/messages/sendcurl -X POST 'https://app.mailyte.com/api/v1/mailbox/messages/send' \
-H 'Authorization: Bearer MAILBOX_TOKEN'const response = await fetch('https://app.mailyte.com/api/v1/mailbox/messages/send', {
method: 'POST',
headers: {
Authorization: 'Bearer MAILBOX_TOKEN',
},
});
const { data } = await response.json();import requests
response = requests.post(
"https://app.mailyte.com/api/v1/mailbox/messages/send",
headers={"Authorization": "Bearer MAILBOX_TOKEN"},
)
data = response.json()["data"]<?php
$response = Http::withToken('MAILBOX_TOKEN')
->post('https://app.mailyte.com/api/v1/mailbox/messages/send');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/mailbox/messages/send")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer MAILBOX_TOKEN"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Successful Response
Returned inside the standard envelope.
Errors
Every status, with what causes it and what to do, is on the error reference.