1

如何在我的邮件功能中发送密件抄送或抄送电子邮件,但我尝试了代码但密件抄送或抄送功能不起作用?

<?php
//SENDS EMAIL THAT TELLS THE USER TO ACTIVATE THE ACCOUNT
$activation = 'activation.php?key='.$key;
$your_email = 'non-reply@mydomain.pk'; //CHANGE TO YOUR SETTINGS
$domain = $_SERVER["HTTP_HOST"]; //YOUR DOMAIN AND EXTENSION
$to  = $email;
$subject = 'MyDomain Activate Account';
$message .='<img src="http://mydomain.com/images/securedownload.jpg"/>';
$message = 'Welcome,<br/> '.$_POST['username'].'. You must activate your account via   this       message to log in. Click the following link to do so:   http://'.$domain.'/'.$activation;
$headers .= "BCC: MyDomain Order Copy <demo@mydomain.com>\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";  
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";  
$headers .= "From: MyDomain <'.$your_email.'@'.$domain.'>\r\n" .  
//"Reply-To: $from \r\n" .  
"X-Mailer: PHP/" . phpversion();    
?>
4

0 回答 0