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

前端 未结 13 939
不思量自难忘°
不思量自难忘° 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

    I had the same issue, so I've disabled one setting on my WHM root login, which is as follows :

    WHM > Home > Server Configuration > Tweak Settings > Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) [?]

    0 讨论(0)
  • 2020-12-14 08:24

    I really have the same problem, finally, i solved it.

    its likey not the Swift Mail's problem. It's Yaml parser's problem. if your password only the digits, the password senmd to swift finally not the same one.

    swiftmailer:
        transport:  smtp
        encryption: ssl
        auth_mode:  login
        host:       smtp.gmail.com
        username:   your_username
        password:   61548921
    

    you need fix it with double quotes password: "61548921"

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-14 08:28

    try putting username in double quote "username", somehow that fixed for me.

    0 讨论(0)
  • 2020-12-14 08:34

    I got the same same error.

    I was using gmail account and Google's SMTP server to send emails. The problem was due to SMTP server refusing to authorize as it considered my web host (through whom I sent email) as an intruder.

    I followed Google's process to identify my web host as an valid entity to send email through my account and problem was solved.

    0 讨论(0)
  • 2020-12-14 08:36

    This might be old but somebody might get help through this. I too faced the same problem and received a mail on my gmail account stating that someone is trying to hack your account through an email client or a different site. THen I searched and found that doing below would resolve this issue.

    Go to https://accounts.google.com/UnlockCaptcha‎ and unlock your account for access through other media/sites.

    UPDATE : 2015

    Also, you can try this, Go to https://myaccount.google.com/security#connectedapps At the bottom, towards right there is an option "Allow less secure apps". If it is "OFF", turn it on by sliding the button.

    0 讨论(0)
提交回复
热议问题