dousong3760
2018-03-15 11:09 阅读 52
已采纳

与bcc无法正常工作的php邮件

I am using below code for sending mail with cc and bcc.

$headers="From: $name <{$fromAddress}>
".
            "Reply-To: info@test.com
".
            "Cc: abc@gmail.com
".
            "BCC: pqr@gmail.com
".
            "MIME-Version: 1.0
".
            "Content-type: text/html; charset=UTF-8";

@mail($toAddres,$subject,$message,$headers,$parameters);

All the things are working fine including reply-to, cc but the bcc is not working.

In the mailbox headers, it is not showing me the bcc mail address. What do I need to fix it?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    duanpanhuo0618 duanpanhuo0618 2018-03-15 11:12

    You could try with ICC (Invisible Carbon Copy) wish is the second name of BCC.

    By the way, BCC is Blind Carbon Copy. So if you don't see them in your mail it's normal.

    点赞 评论 复制链接分享
  • donglang1976 donglang1976 2018-03-15 11:17

    without having a close look to your code I think the problem is that they do not recieve your e-mail which is set as BCC

    the reason might be you used BCC instead of Bcc

    Corrected $header

    $headers="From: $name <{$fromAddress}>
    ".
            "Reply-To: info@test.com
    ".
            "Cc: abc@gmail.com
    ".
            "Bcc: pqr@gmail.com
    ".
            "MIME-Version: 1.0
    ".
            "Content-type: text/html; charset=UTF-8";
    

    I have changed the BCC: to Bcc:

    点赞 评论 复制链接分享

相关推荐