使用php邮件功能无法发送邮件 [英] cannot send mail using php mail function

查看:119
本文介绍了使用php邮件功能无法发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的本地计算机上使用PHP邮件,但它只是不工作。我正在使用php网站的标准脚本:



PHP错误我正在获得

  SMTP服务器响应:550发送消息时发生错误:FROM地址无效

实际PHP

  $ to ='nobody@example.com'; 
$ subject ='主题';
$ message ='hello';
$ headers ='From:webmaster@example.com'。 \\\\。
'Reply-To:webmaster@example.com'。 \\\\。
'X-Mailer:PHP /'。 phpversion();

mail($ to,$ subject,$ message,$ headers);我下载了一个本地邮件服务器,argosoft,

它说服务网址是 http://services.argosoft.com/RelayService/Service.asmx。我假设这是我放在php.ini中的。



php ini。

 仅适用于Win32。 
SMTP = services.argosoft.com/RelayService/Service.asmx
smtp_port = 25


解决方案

我以前遇到过这个错误,我相信你所要做的只是更改电子邮件 webmaster@example.com 到一个真正的电子邮件确保将其发送到真实的电子邮件。


Im trying to use PHP mail on my local computer, but its just not working. I am using the standard script from the php website:

PHP error I'm getting

SMTP server response: 550 Error sending message: Error: FROM address is invalid

actual 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);

i downloaded a local mail server, argosoft. it says the service URL is http://services.argosoft.com/RelayService/Service.asmx . I assume this is what i put in php.ini.

php ini.

 For Win32 only.
 SMTP = services.argosoft.com/RelayService/Service.asmx
 smtp_port = 25

解决方案

I have had this error before, and I believe all you have to do is change the email webmaster@example.com to a real email. Make sure you send it to a real email as well.

这篇关于使用php邮件功能无法发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆