Mail Function with Multiple BCC's in the header

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
timbalera
Forum Newbie
Posts: 1
Joined: Tue Nov 04, 2003 3:53 pm

Mail Function with Multiple BCC's in the header

Post by timbalera »

I am using the mail function to generate automatic emails. I understand that you can use a header to indicate blind copies. However, I don't know the proper string formatting for multiple BCC's. See code snippet below:

$header = "From: test@mail0.testnetwork.com\r\nbcc: abcd@hotmail.com\r\nbcc: helpme@help.com";
mail($address, $subject, $body, $header);

I have read the PHP manual online, and checked my books, but proper syntax for multiple header items just isn't clear. Please help. Thanks.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

A shot in the dark...

Code: Select all

$header = "From: test@mail0.testnetwork.com\r\nbcc: abcd@hotmail.com, helpme@help.com";
mail($address, $subject, $body, $header);
Using , as delim between the addys?
Sorry, can't test to verify.
Post Reply