我有一些这样的代码,在显示所有收件人的 AddAddress 和 AddBCC 中发送邮件后,我想隐藏所有其他收件人,我该如何隐藏它你知道吗?
<?php
if(!empty($_POST['invite'])) {
foreach($_POST['invite'] as $check) {
}
$import_emails = implode($_POST['invite'], ',');
$imp_eml = explode(',', $import_emails);
$mail->MsgHTML($body);
foreach ($imp_eml as $addr)
{
$mail->AddAddress($addr);
$mail->AddBCC($addr);
}
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->From = 'info@myweb.com';
$mail->FromName = 'Someone';
$mail->Host = '********';
$mail->SMTPAuth = true;
$mail->Username = '*******';
$mail->Password = '*******';
if($mail->Send())
{
echo "success";
} else {
echo "failure";
}
?>