|
哎,还是出错。就是发不出去,smtp 服务已经配置好了。邮件客户端 已经测试了。就是php 没测试成。
[PHP]
[mail function]
; For Win32 only.
;SMTP = localhost
SMTP = 192.168.18.102
smtp_port = 25
; For Win32 only.
sendmail_from = wide288@999.com[/PHP]
我的系统是win xp
[PHP]
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to="wide288@126.com";
// Your subject
$subject="Test";
// From
$header="from: wide288 <wide288@999.com>";
// Your message
$message="Hello \r\n";
$message.="This is test\r\n";
$message.="Test again ";
// send email
//$sentmail = mail($to,$subject,$message,$header);
$sentmail = mail("wide288@126.com",
"Test",
"Hello \r\n This is test\r\n Test again",
"from: wide288 <wide288@999.com>");
// if your email succesfully sent
if($sentmail){
echo "Email Has Been Sent .";
}else {
echo "Cannot Send Email ";
}
[/PHP] |
|