SMTP server response: 550 5.7.1 Unable to relay in - Sending email to a non-company address

元气小坏坏 提交于 2019-12-05 13:06:27

To prevent abuse for sending spam, many email servers require that the client be authenticated as a legitimate user before relaying mail (forwarding it to the recipient's email server). You have specified credentials in IIS; however, PHP does not make use of them.

Here are your options:

  • Instead of the mail() function, use one of the existing PHP mailer libraries that supports SMTP authentication (PEAR Mail, phpmailer, Swift Mailer, etc.).
  • Install and configure msmtp or one of the alternatives (here's how to make msmtp work with PHP). PHP will execute the program, which does support SMTP authentication, whenever it has to send a message if you set sendmail_path accordingly.
  • Change the mail server's configuration to allow relaying mail from the web server's IP address.

You need to check your Smtp provider's policy. Or you need to check your Smtp server configuration (if this server deliver the emails directly)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!