PHP send mail to multiple email addresses

Fore readability sake in the code use an array and implode it to a comma separated string:-

$recipients = array(
  "[email protected]",
  // more emails
);
$email_to = implode(',', $recipients); // your email address
$email_subject = "Contact Form Message"; // email subject line
$thankyou = "thankyou.htm"; // thank you page

Leave a Comment