E qual'è il problema?
Codice PHP:
<?php
$to = "yourplace@somewhere.com";
$subject = "My HTML email test.";
$headers = "From: [email]myplace@here.com[/email]\r\n";
$headers .= "Reply-To: [email]myplace2@here.com[/email]\r\n";
$headers .= "Return-Path: [email]myplace@here.com[/email]\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = "<html><body>";
$message .= "<h1> This is a test </h1>";
$strSQL="SELECT * FROM order_detail WHERE customer = '$customerid'";
$result=mysql_db_query("xxxxxxxxxxxxx",$strSQL);
while ($row=mysql_fetch_array($result))
{
$message .= "eventuale codice HTML".$row[peso]."eventuale codice HTML";
}
$message .= "</body></html>";
if ( mail($to,$subject,$message,$headers) ) {
echo "The email has been sent!";
} else {
echo "The email has failed!";
}
?>