Forum Moderators: coopster
$subject = $row_rs_list["calendarmssgs.title"];
$message = "This message is to remind you that you are registered for the class at Mere Bulles on 10/1/03 at 5:30pm.";
do {
$to = $row_rs_list['emailaddress'];
mail($to, $subject, $message, "From: some person <info@site.com>");
} while ($row_rs_list = mysql_fetch_assoc($rs_list));
mysql_free_result($rs_list);
header ( "Location: [site.com...]
?>
id is passed from a form to process a list of attendees to an event. When the code is run I get an email error in the inbox where it says that no recipient email address was added. The script runs perfectly if it is output in a table. Any ideas?
[edited by: jatar_k at 9:53 pm (utc) on Sep. 8, 2003]
[edit reason] generalized emails and url [/edit]
mail($to, $subject, $message, "From: some person <info@site.com>");
Not sure if this will make a difference for you but a properly formated From header should look like:
mail($to, $subject, $message, "From: \"some person\" <info@site.com>\n");
The persons name *should* be in quotes. And each header *must* end with a new line.
daisho