Phpmailer AddBcc not working

只愿长相守 提交于 2019-11-29 09:14:48

Use as

$mailer->AddBCC("foo@gmail.com", "test");
$mailer->AddCC("something@gmail.com", "bla");

You never see BCC details. That's what they are BCC details for. Even the recipient of a BCC will not see his own name with the recipients.

PS: You noticed you wrote addBCC instead of AddBCC (capital A)?

panepeter

From the phpMailer function reference:

Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

This might be causing your issue.

PHPMailer not sending CC or BCC

Old question, but I ended up here looking for an answer. Just learned elsewhere that those functions AddCC and AddBCC only work with win32 SMTP

Try using:

$mail->addCustomHeader("BCC: mybccaddress@mydomain.com"); See http://phpmailer.worxware.com/?pg=methods

Hope this helps someone, cheers!

the bcc will never show; only TO and CC

BCC=Blind Carbon Copy

It´s addBCC

$email->addBCC('my@email.com', 'My Name');

See PHPMailer.php (current version 6.0.5) on line 934 (https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L934):

/**
 * Add a "BCC" address.
 *
 * @param string $address The email address to send to
 * @param string $name
 *
 * @return bool true on success, false if address already used or invalid in some way
 */
public function addBCC($address, $name = '')
{
    return $this->addOrEnqueueAnAddress('bcc', $address, $name);
}
Marco Antonio

To operate the clausla BCC AddCC MUST precede as well nuloy hidden email will arrive to your recipient would otherwise happen nuna Example:    

$ mail-> AddCC ("");
$ mail-> AddBCC ("mail @ domain")
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!