[thelist] sending mail to multiple recipients in php
Anthony Baratta
Anthony at Baratta.com
Wed Aug 23 17:26:04 CDT 2000
At 02:56 PM 8/23/2000, you wrote:
hey all...
i'm working on a script that will allow a client to send a message to a
mailing list that is pulled out of a database. i've got the script working
just fine, though it needs a little tweak here and there. essentially, i
pull the e-mails out of a database, put them all into one string, and then
stick that string into the "to" field using php's mail()
function. however, in the e-mail the recipient gets, all of the e-mail
addresses are viewable in the "to:" field. is there some way to hide those
e-mail addresses?
http://www.php.net/manual/function.mail.php
I stole this from the above link......
And massaged for your needs.
<?php
// switch the value of $email to the
// persons email address you are sending
// this to.
$email = "username at myisp.com";
$subject = "Working PHP v4.0b4 mail script";
$body = "Um, looks good from here.";
$headers = "From: mymailer at mydomain.com\n";
$headers .= "Reply-to: noreply at mydomain.com\n";
$headers .= "Bcc: username at myisp.com\n";
$headers .= "Bcc: username at myisp.com\n";
$headers .= "Bcc: username at myisp.com\n";
$headers .= "Bcc: username at myisp.com\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
mail ($email, $subject, $body, $headers);
echo "schweeeeeet.....its workin'";
?>
----
Anthony Baratta
President
Keyboard Jockeys
More information about the thelist
mailing list