php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9858 mail() still doesn't send cc
Submitted: 2001-03-20 01:45 UTC Modified: 2001-03-20 05:30 UTC
From: joel at intwebservices dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.0.4pl1 OS: Windows NT 4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joel at intwebservices dot com
New email:
PHP Version: OS:

 

 [2001-03-20 01:45 UTC] joel at intwebservices dot com
script example:
-------------------------------------------------------------------------------------------------
<?php
$returnvar="false";
		
$mailto="you@yourdomain.com";
$mailsubject="cc test";
$mailmessage="message content";
$mailHeader="Cc:otheraddress@yourdomain.com\r\n";
		
$returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader);	
	
?>
<html>
<body>
the mail was sent?
<?php
echo "<br>returnvar= $returnvar<br>";
?>
</body>
</html>
---------------------------------------------------------------------------------
The above does not send the carbon copy.

I think the problem is here in win32 sendmail.c :

	if (headers && (pos1 = strstr(headers, "Cc:"))) {
		pos2 = strstr(pos1, "\r\n");
		tempMailTo = estrndup(pos1, pos2-pos1);

Should be  tempMailTo = estrndup(pos1+2, pos2-pos1); 
I think since the pos of "Cc: would give the position of the first C in "Cc:".
"headers" should also be made all upper case to catch the "cc" or the "CC"



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-20 05:30 UTC] sniper@php.net
submitted twice.

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 15:01:24 2019 UTC