The below code is an example of what will be emailed to my clients.
The previous page will be a simple form with one field called “email_list”.
I’m going to input multiple email addresses seperated by an “;” ([email][email protected][email][email protected]
Here is the part where i’m totally lost, when they hit submit, how can I tell the code below to send this to every email receipent in an array/loop until its finished, after display a message, “All Emails Have Been Sent”?
Thanks for you help!
[code=php]
<?php
$to = “$email_list”;
$subject = “E-Newsletter”;
$headers = “To: $email_list <$email_list>rn”;
$headers = “From: Company <[email protected]>rn”;
$headers .= “MIME-Version: 1.0rn”;
$headers .= “Content-Type: text/html; charset=ISO-8859-1rn”;
$message = “<html>n”;
$message .= “<head>n”;
$message .= “<title>Test</title>n”;
$message .= “</head>n”;
$message .= “<body>n”;
$message .= “</body>n”;
$message .= “</html>n”;
mail($to, $subject, $message, $headers);
?>