簡體   English   中英

phpmailer添加密件抄送不起作用

[英]Phpmailer Add Bcc not working

我正在使用Phpmailer發送郵件。 除密件抄送外,它工作正常。 密件抄送收件人看不到抄送和收件人。 為什么會這樣呢?

require_once("PHPMailer_v5.1/class.phpmailer.php");
            $mailer = new PHPMailer();
            $mailer->IsSMTP();

            $mailer->SMTPAuth = true;
            $mailer->SMTPSecure = "tls";

            $mailer->Host = 'smtp.gmail.com';
            $mailer->Port = 587;            

            $mailer->Username = $userid;
            $mailer->Password = $epwd;
            $mailer->FromName = $fromname;
            $mailer->From = $userid;
            $mailer->AddAddress($to,$toname);
            $mailer->Subject = $subject;                
            $mailer->Body =$content;                
            $mailer->AddCC($cc, $tocc);             
            $mailer->AddBCC($bcc, $tobcc);          
            $mailer->AddAttachment($dest_filename);
            $mailer->Send()

這是一個Gmail問題。 您是否與其他SMTP服務提供商進行了測試?

從class.phpmailer.php中:

/**
  * Adds a "Bcc" address. Note: this function works<br>
  * with the SMTP mailer on win32, not with the "mail"<br>
  ...
 */
function AddBCC($address, $name = '') {
  ...
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM