ID:               15841
 Comment by:       m_alpka at tlen dot pl
 Reported By:      rha at juggernaut dot com dot au
 Status:           No Feedback
 Bug Type:         Mail related
 Operating System: Linux
 PHP Version:      4.1.2
 Assigned To:      yohgaki
 New Comment:

I discovered another temporary solution. It's similar to @guy's but it
is not using additional scripts that have to be installed
(unix2dos,dos2unix). Also php didn't allow me to use piped sendmail in
sendmail_path (php.ini)
I'm using qmail.

---
cd /var/qmail/bin
cat > sendmailfix

#!/bin/sh
sed 's/^M$//' | /var/qmail/bin/sendmail ${1+"$@"}
[Ctrl+D]

chmod 555 sendmailfix
chgrp popuser sendmailfix
---
^M is a combination of [Ctrl+V, Ctrl+M]

Finally set the value of sendmail_path in php.ini to our script

---
sendmail_path = /var/qmail/bin/sendmailfix -t -i


Previous Comments:
------------------------------------------------------------------------

[2007-02-07 10:05:27] [EMAIL PROTECTED]

http://www.php.net/manual/en/reserved.constants.php

PHP_EOL (string) 
Available since PHP 4.3.10 and PHP 5.0.2

------------------------------------------------------------------------

[2007-02-07 09:55:43] bigtree at donotspam dot 29a dot nl

Might I suggest to add a platform-dependant PHP constant (for example
MAIL_HEADER_SEPARATOR) so we can use the mail() function with
platform-independent code?

The constant value would be '\n' on unix and '\r\n' on windows.

------------------------------------------------------------------------

[2006-11-30 08:10:38] tech+ohtf dot cuc dot arg at onlineopinion dot
com dot au

The PHP documentation now asks for "\n" , which is correct for its
implementation in Unix systems, so the bug as originally reported is
solved. I can't comment on whether this change might have caused
problems in Windows, but I assume not.

Note: This was not just an issue with qmail; it also affected postfix's
implementation of 'sendmail'.

------------------------------------------------------------------------

[2006-07-11 20:03:01] bug at bug dot com

nevermind, please delete my previous comment. qmail is broken and dead.
let's just move forward instead of trying to support legacy software and
holding technology back.

please close this ticket and label it as "will not fix," which i
suppose is the correct status.

------------------------------------------------------------------------

[2006-07-11 18:30:19] bug at bug dot com

what php needs is to make the $headers argument for the mail() function
an array instead of a string and then php will automagically put the
correct line endings depending on what OS it's running on. \n for unix,
\r\n for windows, \r for mac

you can keep it backwards compatiable by accepting a string as well.
also add another option in the php.ini to enable/disable the mangling
of the header line endings.

could we get an update on this bug please?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15841

-- 
Edit this bug report at http://bugs.php.net/?id=15841&edit=1

Reply via email to