Content-Transfer-Encoding: 7bit
Content-Type: plain/text
As per rfc5322 you need to break line (add CRLF) after 78 characters.
My question is how can I decode the text/body back(remove the CRLF)? How do I know which CRLF was added by the encoder and which was part of the original body content? I've checked few implementations but most of them don't seem to bother though on encoding the rule is enforced.
Actually, rfc5322 states:
Each line of characters MUST be no more than 998 characters, and SHOULD
be no more than 78 characters, excluding the CRLF.
That said, it is recommended to limit lines to 78 characters.
For text-based MIME parts (such as the one in your example), you have a few options to achieve this:
text/plain; format=flowed
. For more information about this format, check out rfc2646. Essentially it provides a way of wrapping long lines that is reversible by the receiving client (hey! that's exactly what you wanted!)Content-Transfer-Encoding
, such as quoted-printable
or base64
.