Email with multiple recipients
Posted: Fri Nov 24, 2006 5:55 am
Hello
I have the following code
$Project_Members could contain upto 10 email address in a string
Example - me@me.com you@you.com them@them.com
How do you send the string using the mail() function
If I have only on email in the string it emails no problem, if there is more than one I get the following error.
"Warning: mail() [function.mail]: SMTP server response: 553 malformed address: < g.*****her@**********.co.uk paul.hi****rch@***********.co.uk>
(Names edited)
Thanks
Geoff
I have the following code
Code: Select all
$email = "$Project_Members";
$subject = "Hello";
$message = "This is a test email";
/* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */
if (mail($email,$subject,$message)) {
//echo "<h4>Thank you for sending email,</h4>";
} else {
echo "<h4>Can't send email to $email</h4>";
}Example - me@me.com you@you.com them@them.com
How do you send the string using the mail() function
If I have only on email in the string it emails no problem, if there is more than one I get the following error.
"Warning: mail() [function.mail]: SMTP server response: 553 malformed address: < g.*****her@**********.co.uk paul.hi****rch@***********.co.uk>
(Names edited)
Thanks
Geoff