slight bug in Log_mail - use of \r\n breaks some mail systems

From: Date: Thu, 14 Aug 2003 01:28:59 +0000
Subject: slight bug in Log_mail - use of \r\n breaks some mail systems
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19703@lists.php.net to get a copy of this message
Hi, this is just a slight bug.. nothing critical at all! just thought I would mention it.. Some of you might remember some posts awhile ago about how the use of \r\n in mail headers can break some qmail systems (and i also believe postfix... well in one situation where I have tested this it does...), ie... the headers get broken.. and you can end up with mail headers within the actual message body. I believe the extent of this argument boiled down to the fact that you shouldnt use \r\n on unix systems, and you should just use \n So in keeping with that theory, perhaps the use of \r\n in the Log_mail class for the From: and User-Agent: headers should be changed. So the changes i would suggest should be something along the lines of.. Either: 1. Check first to see if the constant MAIL_MIME_CRLF has been set, as we can assume that if this has been set (either by the user, or the mime mail class) that mails should use this return char. IE.. if the user knows of this problem they are probably defining this constant rather than letting the mail class determine it for them. or... 2. Give the user an option to set the return char or... 3. perhaps both of the above... ? Like i said.. this is definetely nothing critical... as it is just a log message, but I thought that I just might point it out anyway. cheers Alex Hayes

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