php mail Failed To receive

时间:2016-03-02 11:00:10

标签: php email ini

I am trying to use the PHP mail() function, However, it doesn't work and outputs the following error:

"Warning: mail(): Failed to Receive in C:\wamp\www\site\indexmail.php on line 29"

I think the issue caused by my IAP, because it works when I use another one.

Here's my php.ini:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = SSL0.OVH.net
smtp_server=SSL0.OVH.net
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = myadress@gmail.com


; For Unix only.  You may supply arguments as well (default:     "sendmail    -t -i").
;http://php.net/sendmail-path
;sendmail_path ="C:\wamp\sendmail\sendmail.exe"

I found the SSL0.OVH.net when i checked a mailbox of one of the employes. If anyone could help me please it would be great

1 个答案:

答案 0 :(得分:0)

我建议你使用PHPMailer或Swift Mailer库。正如我在文档中发现的那样,选项smtp_server不存在。

每个在线可访问的SMTP服务器都应该请求身份验证,否则邮件服务器可能会用于发送垃圾邮件。我不知道有可能通过php.ini

来做到这一点

还要检查邮件客户端中的邮件配置,以确保它们不是问题。