douxunnian0423 2014-03-24 07:22
浏览 297
已采纳

使用SMTP发送邮件时使用Cc和Bcc的问题 - PHP

I'm sending email from my php page using SMTP. everything works perfect except Bcc.

This is how I got my email, Interestingly I can see bcc as well. enter image description here

Whats wrong in my code, can anyone please help.

$Headers = array("MIME-Version"=> '1.0', 
"Content-type" => "text/html; charset=iso-8859-1",
"From" => $From,
"To" => $To, 
"Bcc" => $User_copy,
"Reply-To" => $From,
"Subject" => $Subject);

$SMTP = Mail::factory('smtp', array ('host' => $Host, 'auth' => true, 'username' => $Username, 'password' => $Password)); 
$mail = $SMTP->send($To, $Headers, $Message);
  • 写回答

2条回答 默认 最新

  • duan0504 2014-03-24 20:25
    关注

    Diagnose:
    Your mail server does not strip Bcc: headers.

    Fix:
    Do not specify bcc recipients in BCC: headers.
    Add the bcc recipients to first parameter of send.

    http://pear.php.net/manual/en/package.mail.mail.send.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 安装GroudingDINO RuntimeError: Error compiling objects for extension
  • ¥15 关于推送项目到github的问题
  • ¥15 急!C++指针编写相关的问题
  • ¥15 kerberos身份认证配置问题
  • ¥30 用python写一个多签情况下波场的代理资源和回收资源
  • ¥15 怎么在matlab中输出显示泵的流量-扬程和管路损失与流量均在一个表格里
  • ¥15 matlab学期例题代码答疑
  • ¥15 在线手电筒追加按钮JS
  • ¥15 调用函数时,无关变量的改变引起函数值的改变
  • ¥15 xy坐标转化为经纬度坐标