我有这个代码应该允许我向多个地址发送电子邮件,但是问题是,它不会将它们发送到多个密件抄送...
这是代码:
$emailbcc=$_POST['emailbcc'];
$sub=$_POST['subject'];
$msg=$_POST['message'];
$emailbcc1= implode("," , $emailbcc);
if($emailbcc!=''){
// multiple recipients
$to = 'address';
// subject
$subject = $sub;
// message
$message = $msg;
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: Up!<address>' . "\r\n";
$headers .= 'Bcc: '.$emailbcc1.'' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
$emailbcc1
是一些电子邮件,我使用复选框获取它们...这有什么问题?谢谢..