contenttransferencodings
Content-Transfer-Encoding is a MIME header field used in email messages to indicate how the body or a MIME part is encoded for transport. It is defined in RFC 2045 and 2046 and is applied so that data can pass through mail servers that may restrict certain byte values. If no encoding is declared, the default assumption is 7-bit US-ASCII, suitable for bodies containing only 7-bit data.
- 7bit: the content consists only of 7-bit ASCII characters, with no octets above 0x7F. This is the
- 8bit: the content may include octets with the high bit set. This is allowed in modern mail
- binary: the body contains raw binary data without any transfer encoding. This is not safe over
- quoted-printable: designed for mostly text with a small number of non-ASCII characters. It uses =XX escapes
- base64: encodes binary and non-ASCII data into ASCII text. It is widely used for attachments and
- Some implementations use extensions starting with x- (for example, x-uuencode historically), though many such forms are
Each MIME part can have its own Content-Transfer-Encoding. Decoding processes reverse the encoding to reveal the