I have an array called $addresses containing all the email addresses of
people to receive an email. Does the following code look like it should
work? Does the the foreach loop look correct?
$subject = "Please complete this paper";
$message = '
You have been invited to the department's annual social on Dec 19.
Please RSVP by Dec 3.
Many thanks.';
$headers = "From: Dean<Im*******@xyz.edu>\r\n";
foreach ( $addresses as $addr ) {
mail($addr, $subject, $message, $headers);
}