Mail to multiple recipients : mail function « Email « PHP






Mail to multiple recipients

<?php
   $headers = "From:sender@java2s.com\r\n";
   $recipients = "test@java.com,a@java2s.com";
   mail($recipients, "This is the subject","This is the mail body", $headers);
?>


           
       








Related examples in the same category

1.Mail cc and bcc
2.Multiple recipients all go into the address field, with commas separating them
3.Use variables in mail function
4.Use the mail function