Kitura / Swift-SMTP

Swift SMTP client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Line length limit

t-ae opened this issue · comments

commented

According to RFC5322:

Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.

If we have multiple to, they are joined to comma separated single line.

dictionary["TO"] = to.map { $0.mime }.joined(separator: ", ")

This can easily violate the 998 characters limit.
In my environment, I receive broken mail if there are too many to.
(I think the behavior is up to mail server's implementation)