Closed toteto closed 1 year ago
hi @toteto thanks for pointing this out. this should be implemented obviously. i just checked Gmail and as you said, they use 76 chars line length (excluding line break). i don't know why it is not 78 but I'm sure they have a good reason for that.
i think asRaw
and asEncoded
methods in MIMEMessage.js file and dump
method of the subject header in MIMEMessageHeader.js file, are proper places to implement this.
Let me know please, if you would like to contribute on this so we handle it together.
Hello @muratgozel @toteto ,
Just my two cents. I think libmime might simplify the fix for this issue?
Thanks
Hi @toteto @glr0221 i just implemented this, as of v2.1. closing this issue now.
note: it turned out 80 chars length was for printing, initially, and it seems like it is still a standard for generating emails.
In RFC-2822 section 2.1.1
The recommendation is for the line lengths to not exceed 78, but there is hard limit on the 998 characters.
From my observations of the popular mail clients like Gmail and Outlook, the content and subject is folded at 78 characters.
@muratgozel What do you think of accepting this recommendation into the library?