Encoding in a binding is a mode that applies to all data added after it is selected: 7-bit, 8-bit or base64. The default is 7-bit.
7-bit and 8-bit do not change the data, except for one thing: a lone LF line feed turns into a CRLF pair. With 7-bit, making sure the high bit of every byte is cleared is the submitter’s job.
base64 encodes on the fly everything added, so it also suits binary content — if the submitter sets the appropriate MIME headers matching Content-Transfer-Encoding.
Mail merge and base64 are incompatible: merge data supports only 7-bit and 8-bit.
Three modes:
| Mode | What it does with the data |
|---|---|
| PmtaMsgENCODING_7BIT | nothing except LF to CRLF; the high bit is the submitter’s job; the default |
| PmtaMsgENCODING_8BIT | nothing except LF to CRLF |
| PmtaMsgENCODING_BASE64 | encodes on the fly; not suitable for merge |
# a binary attachment: base64 with a matching MIME header msg.setEncoding(PmtaMsgENCODING_BASE64);
2 relations
The line ending requirementA related mechanism: they work together. § 7.4.10
grep -rn 'PmtaMsgENCODING' /opt/pmta/api/include/ | head
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.