chadxz / imap-simple

Wrapper over node-imap, providing a simpler api for common use cases
MIT License
243 stars 80 forks source link

Append function should replace \n with \r\n #64

Closed rostopira closed 3 years ago

rostopira commented 5 years ago

Some servers doesn't understand \n so whole email appears as single line inside Content-Type I think append function should replace all \n with \r\n I had to do that manually to make it work

rostopira commented 5 years ago

Hosting company replied, that \r\n are required by RFC5322 standard Section 2.1:

Messages are divided into lines of characters. A line is a series of characters that is delimited with the two characters carriage-return and line-feed; that is, the carriage return (CR) character (ASCII value 13) followed immediately by the line feed (LF) character (ASCII value 10). (The carriage return/line feed pair is usually written in this document as "CRLF".)