Originally posted by Pests
Like so:
$to = 'someone@something.com';
$subject = 'HTML Email!';
$message = '<a href="http://www.php.net">PHP.net</a>';
$headers = "Content-type: text/html; charset=iso-8859-1\r\n";
mail($to, $subject, $message, $headers);
For more imformation refer to:
http://www.php.net/manual/en/function.mail.php [/B]
Hi, Pest,
According to your suggestion, I made a simple scripts as
<?
$to='qianxcn@ozemail.com.au';
$subject='tst mail';
$body='Hi, Dave, Sunstone put ATS there';
$headers="(Content-type:text/html;charset=iso-8859-1\r\n)";
$send_check=mail($to,$subject,$body,$headers);
if($send_check!=true)
{
echo "an error occurred when sending mail";
die();
}
?>
But it seems it always gives me "an error accurred when sending mail". I do not know what's wrong. My other PHP scripts work fine on my FreeBSD4.7 server. My php version is 4.0.5-dev.
Your early reply will be highly appreciated
Jennifer