Engine/UncategorisedDevelopmentThemes/ManagingExpectationsForMessageAttachments
Managing Expectations For Message Attachments
Attachments in the engine’s message
struct are never transport encoded.
You don’t send us transport-encoded attachments, and we don’t return them to you.
PGP attachments generated by the engine always come back ASCII-armored. This does not count as “transport-encoded” for the engine’s purposes, because we make no assumption about whether ASCII on the wire is acceptable to the caller.
When you send a message struct to the engine, you must remove all transport encoding, which means we should receive binary data blobs for binary attachment types, base64/quoted-printable-decoded text for alternate character sets, etc.
You should not strip the armor from PGP attachments. Again, this is not transport-encoding as far as the engine is concerned.
When you get a message struct FROM the engine, you should expect the same.
Binary blobs will be binary blobs, text will be unencoded text, and PGP attachments will be ASCII-armored PGP attachments if they came from us. What your adapter or app does with this is up to you.
In short: transport-decoded in, transport-decoded out.