Re: Fwd: PEAR Mail

From: Date: Fri, 13 Jun 2003 07:04:17 +0000
Subject: Re: Fwd: PEAR Mail
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17373@lists.php.net to get a copy of this message
On Wed, Jun 11, 2003 at 09:26:10AM -0400, Chuck Hagenbuch wrote: > When using your PEAR Mail module as an interface for mail() PHP > function, I noticed that I would got an extraneous line feed before > the actual message body. Looking at the source code, I found out that > mail headers were "incorrecly" tied together: you use a single "\n" > character where as you should insert "\r\n" between header fields > (please see specific note at <http://www.php.net > /manual/en/function.mail.php>) "\r\n" is definitely correct. I've committed the changes to use it consistently. > I took the liberty of tweaking Mail.php source. Please let me know if > my changes have an impact with qmail or sendmail. I tested all of the concrete Mail implementations (sendmail, smtp and mail) with the change, and they all work correctly. I don't have a qmail installation, but Postfix's sendmail wrapper worked fine. > Also why don't you use a switch statement ? I had one in there while reworking the code for the "\r\n" fix, but I decided that I liked using the identify comparison (===) even better than using a switch. For only three possible branches, it really doesn't make a difference, anyway. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.pear.dev (#17373) next »