Click to See Complete Forum and Search --> : Why it doesn't send any e-mail?


Perfidus
12-15-2003, 03:50 PM
/* recipients */
$to = "whatever@whatever.com" . ", " ; // note the comma
$to .= "whatever@whatever.com";

/* subject */
$subject = $Ref;

/* message */
$message = "
<body>
<html>
<table width='100%' border='1' cellpadding='0' cellspacing='0' bordercolor='#CCCCCC'>
<tr>
<td><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>
<tr>
<td colspan='2'><div align='right'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'><strong>N&uacute;mero
de referencia:</strong> ".$codigo."<img src='http://www.whatever.com/images/1nada.gif' width='10' height='9'></font></div></td>
</tr>
</table>
</body>
</html>//The html code I have is longer, but I do not think error comes from there...
";
}//This bracket is from a bucle I have opened above!
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "To: Belén <contact@whatever.com>, Ignacio <whatever@whatever.com>\r\n";
$headers .= "From: Customer <$email>\r\n";


/* and now mail it */
mail($to, $subject, $message, $headers);

Aronya1
12-15-2003, 05:24 PM
I don't know if this has anything to do with the problem, but you opened your <body> tag before your <html> tag. Also, you have 2 tables opened, but close only one.

What's the error you mention?


<body>
<html>
<table width='100%' border='1' cellpadding='0' cellspacing='0' bordercolor='#CCCCCC'>
<tr>
<td><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>
<tr>
<td colspan='2'><div align='right'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'><strong>N&uacute;mero
de referencia:</strong> ".$codigo."<img src='http://www.whatever.com/images/1nada.gif' width='10' height='9'></font></div></td>
</tr>
</table>
</body>
</html>