我试图在我的本地计算机上使用 PHP 邮件,但它就是不工作。我正在使用来自 php 网站的标准脚本:
我遇到的 PHP 错误
SMTP server response: 550 Error sending message: Error: FROM address is invalid
实际的PHP
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
我下载了一个本地邮件服务器,argosoft。它说服务 URL 是 http://services.argosoft.com/RelayService/Service.asmx .我假设这是我放入 php.ini 的内容。
php 初始化程序。
For Win32 only.
SMTP = services.argosoft.com/RelayService/Service.asmx
smtp_port = 25
最佳答案
我以前遇到过这个错误,我相信你所要做的就是将电子邮件 webmaster@example.com
更改为真实的电子邮件。确保您也将它发送到真实的电子邮件。
关于php - 无法使用php邮件功能发送邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6210156/