<HTML>
<HEAD>
<TITLE>mail</TITLE>
</HEAD>
<BODY>
<?
//define who is to receive the mail
$mailTo = "leon@clearink.com";
//set the subject
$mailSubject = "Testing Mail";
//build body of the message
$mailBody = "This is a test of PHP's mail function.";
$mailBody .= "It was generated by PHP version ";
$mailBody .= phpversion();
//add a from header
$mailHeaders = "From: php@clearink.com\n";
//send mail
mail($mailTo, $mailSubject, $mailBody, $mailHeaders);
?>
</BODY>
</HTML>
Warning: Server Error in D:\PHP\PHP\bgyp\audit\mail.php on line 29
这是mail()的执行结果。
我写的是:
line 29:
mail("zxl@dahengit.com", "没有主题","abcdefghijklmnopqrstuvwxyz");