|
-
Apr 9th, 2008, 10:30 AM
#1
Thread Starter
Frenzied Member
php, mail, cc not really working
Hi,
The following code run without errors. I get the mail ,and also it show the mail was cc'ed to who it should.
but the mail never arrive at the cc'ed address..tired of this one now!
Code:
function send_site_message ($name, $country, $email, $subject, $message, $selfcc) {
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if ($selfcc)
$headers .= "cc:".$name."<".$email.">";
$message = "
<html>
<head> ... and rest of html...
</html>
";
$success = mail(SMTP_USER, $subject, $message, $headers, "-f".$email);
-
Apr 10th, 2008, 02:45 AM
#2
Re: php, mail, cc not really working
Try
"cc:".$email;
; so don't mention the name.
-
Apr 10th, 2008, 06:40 AM
#3
Re: php, mail, cc not really working
I do believe the correct format is "Cc: [email protected]" note the space and capitalisation of the first C. Also, the MTA as per RFC 1123 is not obliged to act upon cc and bcc headers so you should use a comma separated list of addresses in the $to argument of the function.
-
Apr 10th, 2008, 10:48 AM
#4
Thread Starter
Frenzied Member
Re: php, mail, cc not really working
thanks both of you.
i followed both of your's advice and seems to work..intermittently. and my html mail seems not to work always..aiya
try it yourself here (excuse the mess..just try to get things working before putting on the makeup)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|