Page 1 of 1

Mail Function with Multiple BCC's in the header

Posted: Tue Nov 04, 2003 3:53 pm
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.

Posted: Tue Nov 04, 2003 4:03 pm
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.