Warning: mail(): Failed to Receive in

2019-07-18 03:43发布

问题:

I am trying to use the php mail function on my windows server over ii7 and i am having this warming which doesn't allow me to send mails.

Warning: mail(): Failed to Receive in xxx 

That line contains this:

mail("mail@myserver.com", "subject", 'body',"From: mail2@myserver.com")

At php.ini i have configured SMTP server, port and sendmail_from like this:

; http://php.net/smtp
SMTP = 128.x.x.xxx
; http://php.net/smtp-port
smtp_port = 110

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

phpinfo() safe_mode is Off.

What can be the problem? Thanks.

回答1:

110 is a POP3 port, not SMTP. Try smtp_port = 25 instead.



标签: email smtp php