Email - Basics << Email - Multiple Recipients >> Email - Headers
Additional recipient emails can be added to the first variable separating them by commas, not semicolons.

$to = ",";

A more advanced method is to put a newline separated email list into a text file, trim each entry, implode them into an array variable, and use the array variable as the $to value.


Revised email script
// read the list of emails from the file.
$email_list = file("elist.txt");

// count how many emails there are.
$total_emails = count($email_list);

// go through the list and trim off the newline character.
for ($counter=0; $counter<$total_emails; $counter++) {
   $email_list[$counter] = trim($email_list[$counter]);

// implode the list into a single variable, put commas in, apply as $to value.
$to = implode(",",$email_list);

$subject = "My email test.";
$message = "Hello, how are you?";

if ( mail($to,$subject,$message) ) {
   echo "The email has been sent!";
   } else {
   echo "The email has failed!";

Having a newline separated list is much easier to manage and edit. An alternative would be to start off with a long comma separated list and get rid of the TRIM and IMPLODE command lines.
Note Be very sure you know what you are doing. This can be a powerful script. Bulk emailing may be considered as SPAM.
Email - Basics << Email - Multiple Recipients >> Email - Headers

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads