初学邮件发送,原理不通,最好帮忙讲解下原理。
     我现在用的邮件服务器是IIS自带的SMTP服务。PHP里的代码如下:
<?php
$to = "[email protected]";
$subject = "Send By PHP";
$msg = "This is a test mail send by php..";
$headers = "From: [email protected]\nReply-To: [email protected]";
mail("$to", "$subject", "$msg", "$headers");
//mail("[email protected]","Test mail function.","Hey,can u receive it?");echo "finished!";
?>
运行后出现错误:Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [email protected] in F:\AppServ\www\text.php on line 6
finished!
求高手解答。