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 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料