Hello
I am using the mail function for a news letter. I am in the process of testing it right now. So far it works but I get this one error even though the emails are being sent correctly.
here is the error: Warning: mail() [function.mail]: SMTP server response: 503 No recipient(s). in C:\wamp\www\ACT\newsletterprocess.php on line 70
here is my code:
while($c <= 2) {
//name email is sent
$nameTo = "Antoni Sousa";
//email body
$emailBody = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table align="center" style="border: #003399 thin solid; width: 800px;">
<thead>
<tr>
<td><img src="http://www.sono-tek.com/images/tryNews/header.jpg" alt="Sono-Tek NewsLetter" /></td>
</tr>
</thead>
<tfoot>
<tr>
<td style="text-align: center; font-size: 10px;">Click Here to remove your address from our mailing list</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>
<b>Dear:</b> '. /* Name Variable here */ $nameTo
.'<br /><br />'.
/* Email body here */
$content
.'</td>
</tr>
</tbody>
</table>
</body>
</html>';
//end the email body
//email header
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $Name <$Email>";
mail($emailTo[$c],$subject,$emailBody,$headers);
//add one to counter
$c++;
}//end while
thanks for the help.