例
<?php
function send_mail($from, $to, $subject, $message)
{
if ($from == "")
{
$from = '回忆未来 <webmaster@s135.com>';//发件人地址
}
$headers = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=gb2312' . "rn";
$headers .= 'From: ' . $from . "rn";
mail($to, $subject, $message, $headers);
}
?>