php mail function with bcc

the mail() function

Moderators: egami, macek, gesf

Post Reply

Fri Jul 19, 2013 11:39 pm

Helo all
I want to use php mail function . such that there is one to address and three bcc adresses. i have tried several ways but not of them worked.
can you please give me a link on this or write a sample code that have used one to address and three or more bcc addresses.
Thanks alot .


Tue Aug 13, 2013 7:39 am

Code: Select all

$to = "email to send to";
$subject = "Subject here";
$message = "Put your message in here";
$headers .= 'FROM: email from' . "\n".
                 'Reply-To: reply to email' . "\n".
                 'X-Mailer: PHP/' . phpversion() . "\n";
$headers .= 'Return-Path: return path email' . "\n";
$headers .= 'Bcc: email toBcc, another email to Bcc, another email to Bcc' ."\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
I think that should work if you insert your info into the proper areas.

php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Thu Aug 15, 2013 8:51 am

it is better to have the bcc addresses after specifying the content type

Post Reply