|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-20 02:42 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.
The pdf manual says:
----------------------------------------------------------------------------------------------------------
$headers .= "cc:birthdayarchive@php.net\n"; // CC to
$headers .= "bcc:birthdaycheck@php.net, birthdaygifts@php.net\n"; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
-----------------------------------------------------------------------------------------------------------
That does not work since Win32 sendmail.c looks for case sensitve "Cc:"
sendmail.c also does not look for "bcc:"
Also you must have "\r\n" not just "\n".
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);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
<?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"); ?> Fails to send with any combination of \r\n or \n, and CC, cC,Cc, and etc. Basically we are are unable to send with CC at all.