SMTP newline fix.
| From: | Vlad Krupin | Date: | Thu, 12 Dec 2002 17:19:22 +0000 |
| Subject: | SMTP newline fix. | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-11583@lists.php.net to get a copy of this message | ||
Another question for you, PEAR people.
SMTP implementation (class Mail_smtp) seems to not be very
RFC-compliant. That breaks some mail client implementations (in
particular, Merak).
The relevant part of RFC is here:
http://www.faqs.org/rfcs/rfc822.html
4.1. SYNTAX
[snip]
The following syntax for the bodies of various fields should
be thought of as describing each field body as a single long
string (or line). The "Lexical Analysis of Message" section on
"Long Header Fields", above, indicates how such long strings can
be represented on more than one line in the actual transmitted
message.
message = fields *( CRLF *text ) ; Everything after
; first null line
; is message body
Notice the CRLF? In the current implementation 'CR' part is missing. Did
I mis-read the RFC? Or did no-one notice the bug? (I find the latter
hard to believe, that's why I am asking). The patch attached fixes the
problem for me, and doesn't break anything else (I have been using it in
production for a couple of weeks). Please, give feedback, and if I get
positive feedback, I'll apply it.
Thanks!
Vlad