是可以的:<?php
$from = '';
$to = '[email protected]';
$subject = 'subject';
$message = 'content';
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=gb2312\r\n";
$headers .= "To: receiver <$to>\r\n";
$headers .= "From: sender <$from>\r\n"; mail($to, $subject, $message, $headers);
?>
$from = '';
$to = '[email protected]';
$subject = 'subject';
$message = 'content';
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=gb2312\r\n";
$headers .= "To: receiver <$to>\r\n";
$headers .= "From: sender <$from>\r\n"; mail($to, $subject, $message, $headers);
?>
不过这样就得加上Reply-To:才能回信
总结一下
/* 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: Mary <[email protected]>, Kelly <[email protected]>\r\n";
$headers .= "From: Birthday Reminder <>\r\n";
$headers .= "Reply-To: [email protected]\r\n";
$headers .= "Cc: [email protected]\r\n";
$headers .= "Bcc: [email protected]\r\n";/* and now mail it */
mail($to, $subject, $message, $headers);