Jump to content

Bug in \IPS\Email compileFullEmail fails to follow RFC 5322 section 2.2.3 on folding Long Headers


Recommended Posts

Hello,

Version 4.7.15

compileFullEmail attempts to fold long headers by using the wordwrap function - but this does not work correctly as whitespace gets 'swallowed' and the extension line does not start with white space. The rule for Long Headers (those that exceed 998 bytes) is that they should be split so that the next part starts with white space -- i.e. crlf ma#y be inserted before the whitespace and NOT as a replacement for the whitespace. "unfolding" only works correctly if the follow on lines start with white space -- i.e. "Unfolding is accomplished by simply removing any CRLF that is immediately followed by WSP."

Our particular failure scenario was when using our application to send to approximately 100 recipients as the $to field then exceeded 1,000 bytes and the To: header was split incorrectly. This then messed up the mail server processing resulting in failures to deliver. Quite probably different mail servers mess up in different ways - in our particular case the mail server put the extension line in the Subject: field and decided that there was no From: header.

Regards,

John

Link to comment
Share on other sites

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...