#23798 [Com]: Space not trimmed in Bcc and Cc parsing
| From: | webmaster at e-xoops dot com | Date: | Mon, 07 Jul 2003 04:40:52 +0000 |
| Subject: | #23798 [Com]: Space not trimmed in Bcc and Cc parsing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-43330@lists.php.net to get a copy of this message | ||
ID: 23798
Comment by: webmaster at e-xoops dot com
Reported By: guidance at g dot yi dot org
Status: Open
Bug Type: Mail related
Operating System: Windows 2000 pro
PHP Version: 4.3.2RC4
New Comment:
Just spent 2 days on same problem under php 4.3.1 trying to send bcc &
cc headers (i know they worked before).
This works:
Bcc:somone@somewhere.com,somone2@somewhere.com
This doesn't:
Bcc: somone@somewhere.com,somone2@somewhere.com
All other header fields seem to work ok as usual with the space after
the :, only bcc/cc seem to be affected here.
Previous Comments:
------------------------------------------------------------------------
[2003-06-25 13:02:54] jharrell at dlc4me dot com
I'm using a To: address in the mail() and a list of inner company
emails under the Bcc: header... but I still get the SMTP Unknown user
error... this error was not here in 4.2.3... but I can confirm that
4.3.2 does have problems with the Bcc and Cc headers... For now I guess
I will send individual emails out. :(
------------------------------------------------------------------------
[2003-05-25 07:11:25] guidance at g dot yi dot org
Some mail servers don't accept blank To, so this problem can't appear.
I'm just using Phorum and Mercury/32 mail server, then found this
problem.
X-Envelope-To header also depends on the mail server. May not be
created at all or other similar header.
------------------------------------------------------------------------
[2003-05-25 05:42:25] guidance at g dot yi dot org
When using blank "To", and only Cc or Bcc to send an email, like
below:
mail("", "the subject", 'message body',
"From: webmaster@$SERVER_NAME\r\n"
."Reply-To: webmaster@$SERVER_NAME\r\n"
."BCC: somebody@server.com\r\n"
."X-Mailer: PHP/" . phpversion());
the receiver mail server will complain user unknown error, if check the
raw received mail, will like this:
......
X-Envelope-To: < somebody@server.com>
......
To:
......
Notice there's an extra space in X-Envelope-To header!
Anyhow, if "To" is not blank, the received X-Envelope-To is correct.
If don't leave space after the colon of Bcc and Cc, the problem could
temporarily resolved.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23798&edit=1