"From: [email protected]\nReply-To: [email protected]\nX-Mailer: PHP/"
这个参数我觉得应该改成
"From: [email protected]\r\nReply-To: [email protected]\r\nX-Mailer: PHP/"
这个参数我觉得应该改成
"From: [email protected]\r\nReply-To: [email protected]\r\nX-Mailer: PHP/"
(你該不會用自己的機器發送的吧)
我看了看最新的手册,提出下面三个看法,大家探讨一下
1.函数原型是
bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])
我建议你只用前面的3个参数发送试试。
2.还有,手册上这么说:
mail() returns TRUE if the mail is successfully sent, FALSE otherwise.
如果成功地发送,就返回true,这个“成功地发送”到底是个什么概念?我对smtp不太了解,是不是“成功发送”了就能“成功收到”呢?
3.手册上还有这么一句话
Note: Make sure you do not have any newline characters in the to or subject, or the mail may not be sent properly.
也值得注意另外:我也做过发送邮件的程序,用的是一个封装了socket的类,我去找一下,贴出来
http://javanow.net/show.php?d=col&i=135
就是这里的两篇文章。
我先看看,完了再来给分喽