php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22785 Can not send mail with a CC
Submitted: 2003-03-19 04:56 UTC Modified: 2003-03-21 01:29 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: admin at aesirnetworks dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.2RC1 OS: Win2K3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: admin at aesirnetworks dot com
New email:
PHP Version: OS:

 

 [2003-03-19 04:56 UTC] admin at aesirnetworks dot com
From news.txt.
- Misc. Win32 mail() enhancements: support 'From:' header (msisolak@yahoo.com),support Bcc header, case-insensitive headers, enhanced error reporting,automatic proper line ending conversion, fixed crash with Cc, fixed buffer overflows with $header. (Markus)

It looks like this issue was addresses specifically in this build, but we are unable to produce results with the following code on our test servers.

This fails everytime....

<?php 
print mail('admin@aesirnetworks.com', 
    'Subject', 'Your message here.', 
    "To: The Receiver <admin@aesirnetworks.com>\n" . 
    "From: The Sender <admin@aesirnetworks.com>\n" . 
    "Cc: Interested <mike@aesirinteractive.com>\r\n" . 
    "X-Mailer: PHP 4.x"); 
?>

We remove the CC line and it works fine. We have tried \r\n, and \n, with all variations of Cc, cC, cc, CC and etc. to no avail.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-19 10:39 UTC] sniper@php.net
Works fine here. Check that you _really_ upgraded to 4.3.2RC1, check your smtp settings, etc.

 [2003-03-19 15:37 UTC] admin at aesirnetworks dot com
We are testing on multiple machines. If you would like to view the info file, have ftp access, or anything else you believe is necessary to see the bug let me know. The code works fine if CC is not there, which means the email settings are fine. Add the CC and it fails. Take the CC out and it works. Please reevaluate.

Mike Faulkner
Systems Administrator
Aesir Network Technologies
 [2003-03-19 15:55 UTC] sniper@php.net
Yes, I tried on windows 2000 machine, and it worked
fine, regardless whether there was CC: or not.

 [2003-03-19 19:30 UTC] admin at aesirnetworks dot com
We seem to have another unrelated technical issue with our single Win2K that has prevented us from doing any further testing there for the moment. But we have 3 Win2K3 boxes that run PHP just fine, with no other problems, and they all send mail fine. But not with the CC added. If this can be narrowed down to a configuration issue within PHP please let us know, but if it works without the CC but not with it, then what else is there to try? We?d like to narrow this down to a fix as soon as possible. If it?s on our end, then so be it, but as far as we can tell it looks like PHP itself is failing to process email correctly when using the CC. Are you using identical code? Or a variation?
 [2003-03-20 18:12 UTC] sniper@php.net
In all previous cases, any problems with mail() have been
configuration issues. So check your php.ini for the mail related settings. (SMTP, etc.)

And from the manual:
"Note:  You must use \r\n to separate headers, although some Unix mail transfer agents may work with just a single newline (\n). "

You need to separate all the headers with \r\n..

 [2003-03-20 18:16 UTC] sniper@php.net
And the name part of the addresses should be enclosed in "'s.
e.g.:

"From: \"The Sender\" <admin@aesirnetworks.com>\r\n" . 

 [2003-03-20 19:11 UTC] admin at aesirnetworks dot com
Thank you kinldy. The last comment enabled us to get the data to the mail server correctly. It was carrying the < symbol to the mail server previously. Works fine now.
 [2003-03-21 01:29 UTC] sniper@php.net
Bogus, as it was (after all) user error.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC