MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

In phpmailer() how to add bcc option ?

1
Started on: 30 April 13
Participants: 1
I am using phpmailer() class to send emails , how to add bcc (blind carbon copy) ?

my class is
$mail = new PHPMailer(true);
try {
$body = $message;
$mail->IsSMTP();
$mail->Host = $smpt_host;
$mail->SMTPAuth = $smtp_auth;
$mail->SMTPSecure = $smtp_secure;
$mail->Username = $smtp_user;
$mail->Password = $smtp_pass;
$mail->SetFrom($noreply, $noreply_name);
$mail->AddReplyTo($noreply,$noreply_name);
$mail->Subject = $subject;
$mail->MsgHTML($body);
$mail->AddAddress($to, $to_name);
$mail->Send();
return true;
}




















I am using phpmailer() class to send emails , how to add bcc (blind carbon copy) ?

my class is

$mail = new PHPMailer(true);
try {
$body = $message;
$mail->IsSMTP();
$mail->Host = $smpt_host;
$mail->SMTPAuth = $smtp_auth;
$mail->SMTPSecure = $smtp_secure;
$mail->Username = $smtp_user;
$mail->Password = $smtp_pass;
$mail->SetFrom($noreply, $noreply_name);
$mail->AddReplyTo($noreply,$noreply_name);
$mail->Subject = $subject;
$mail->MsgHTML($body);
$mail->AddAddress($to, $to_name);
$mail->Send();
return true;
}

This challenge is listed under Open Source , Development & Implementations and Networks & IT Infrastructure Community

Related Posts:

Initiator

Aravinthan
Aravinthan
  Follow

I am passinate about IT & PHP , Let's do it

More posts by: Aravinthan Asokan

1 Suggestion

  1. 04 May 13
    0

    hi try this

    $bcc = "xyz@domain.com"; (use ; for multiple)

    $mail->AddAddress($to, $to_name); if($bcc)$mail->AddBCC($bcc); $mail->Send();

Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top