当发布新回复时,我正在使用 php mail 向消息线程中的所有成员发送邮件。
include('Mail.php');
include('Mail/mime.php');
// Constructing the email
$sender = "sender@sender.com"; // Your name and email address
//$to= "" ; // The Recipients name and email address
$subject = $Sname." has posted a reply"; // Subject for the email
$html = "<html><body><p> DearMember, <br> $Sname has replied to one of your posts. </p></body></html>";
$crlf = "\n";
$headers = array(
'From' => $sender,
'Return-Path' => $sender,
'Subject' => $subject,
'Bcc' => $recipients
);
// Creating the Mime message
$mime = new Mail_mime($crlf);
// Setting the body of the email
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$body = $mime->get();
$headers = $mime->headers($headers);
// Sending the email
$mail =& Mail::factory('mail');
$mail->send(null, $headers, $body);
现在,我将收件人称为“成员”。是否可以将其更改为个人用户名并仍然使用密件抄送功能?