mail() 也发html文件

/* $message: mailbody
   $type: been sent mail type
   $to: the mail to 
   $from: the man who sent mail 
   $title: the project of mail
*/
//=========================================
switch ($type){
case 'html':
$header="Content-type:text/html;";
    break;
    default :
    $header='';
}



mail("$to", "$title", $message, "From: $from\nReply-To:$from\n".$header);