Since version 5.5, a message submitted over HTTP does not have to be assembled: in the content object, instead of a finished email_rfc822, you pass from, subject, reply_to, headers, text, html, amp_html and attachments, and the node assembles the message itself.
Encoding is the node’s job: it encodes non-ASCII characters as needed — in headers per RFC 2047, in the body as quoted-printable. Text in the request is plain UTF-8 and must not be encoded: substitutions are performed before encoding and line wrapping.
Duplicates are silently ignored: of parts with the same name, only the first gets into the message.
Fields of the content object:
| Field | What it carries |
|---|---|
| from, reply_to, subject | the sender, the reply address, the subject |
| headers | custom headers |
| text, html, amp_html | body parts |
| attachments | attachments |
# content in parts instead of a finished message "content": {"from": "news@example.com", "subject": "[name], hello", "text": "Hi [name]", "html": "<p>Hi [name]</p>"}
1 relation
Encodings at submissionA related mechanism: they work together. § 8.1.5
grep -n -A4 '<transmissions-api' /etc/pmta/config
3 articles
◇How a message gets into the engineSix described submission methods: extended SMTP, four language bindings and a directory the node watches on disk.◇Who is allowed to submit mail and for whom to accept itOut of the box, the node accepts submission only from the machine itself; two different questions — “who can send through us” and “for whose addresses we accept mail” — are answered by different directives.◇Headers the sender uses to control deliverySix control headers let the submitting side choose a stream, tag a message with a job, set signing options and the key, the envelope identifier and the schedule; each is allowed separately and per source.