Forum Moderators: coopster

Message Too Old, No Replies

how can i mass email in PHP

         

jason_smith

7:50 pm on Jun 10, 2004 (gmt 0)



hello, can anyone please tell me how i can send emails to muliple receipients using php, just like a mailing list? i tryed this:

$emails = "email1@domain.com;email2@domain.com";
$headers = "From: " . $from . "\n" .
"To: " . $emails . "\n" .
"CC: " . $cc . "\n" .
"BCC: " . $bcc;
mail("", $subject, $body, $headers);

it just dont work with multiple receipents for some reason.

thank you

stevenmusumeche

8:08 pm on Jun 10, 2004 (gmt 0)

10+ Year Member




$emails=array("email@aol.com", "email2@aol.com", "email3@aol.com");

foreach ($emails as $email) {
mail($email,"Your Subject","Your Message","Your Headers");
}

Be careful. Your host might not like this.