What is subject encoding (=?UTF-8?...=)?
Subject encoding ensures non ASCII characters like accented letters or emojis are properly represented in email headers. This uses the MIME Encoded Word syntax defined in RFC 2047. The general form is `=?charset?encoding?encoded text?=` and helps transport non ASCII text safely through systems built for plain ASCII only.
The single letter after the charset names the encoding method. `B` means Base64 encoding and `Q` means Quoted Printable encoding. `B` is commonly used for binary heavy or non trivial text and `Q` is more efficient for mostly ASCII text that contains a few special characters.
For example `=?UTF-8?B?Sm91cm7DqSB2b3VzIHRvdXM=?=` is a Base64 encoded subject. Without correct encoding your elegant subject could turn into unreadable gibberish once it leaves port.
Was this answer helpful?
Thanks for your feedback!