PHP Swift mailer: Failed to authenticate on SMTP using 2 possible authenticators

前端 未结 13 961
不思量自难忘°
不思量自难忘° 2020-12-14 07:41

When I send an email with the PHP Swift mailer to this server: smtp.exchange.example.com like this:

// Load transport
$this->transport =
    Swift_SmtpTra         


        
13条回答
  •  爱一瞬间的悲伤
    2020-12-14 08:24

    First check if there is any connectivity problem and you can reach the SMTP server:

    In terminal type:

    telnet servername portnumber 
    

    If you receive the 220 response you can reach the SMTP server and there is no connectivity problem but if the connection to the server failed see what's wrong in your network.

    If the server needs auth try to authenticate on the server by username and password and see if something goes wrong.

    At last see if the server requires encryption and if yes openssl and other stuff are configured correctly.

提交回复
热议问题