• After verifying this plugin on my Google Cloud i tried to send a test email and this error pop up while using TLS or SSL.

    
    Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ),)
    Connection: opened
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "220 smtp.gmail.com ESMTP n69sm2379861ita.0 - gsmtp"
    SERVER -> CLIENT: 220 smtp.gmail.com ESMTP n69sm2379861ita.0 - gsmtp
    CLIENT -> SERVER: EHLO www.*****
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [104.198.50.102]"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]"
    SMTP -> get_lines(): $str is "250-SIZE 35882577"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577"
    SMTP -> get_lines(): $str is "250-8BITMIME"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577250-8BITMIME"
    SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $str is "250-PIPELINING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING"
    SMTP -> get_lines(): $str is "250-CHUNKING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    SMTP -> get_lines(): $str is "250 SMTPUTF8"
    SERVER -> CLIENT: 250-smtp.gmail.com at your service, [104.198.50.102]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    Auth method requested: XOAUTH2
    Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
    CLIENT -> SERVER: AUTH XOAUTH2 dXNlcj1yYW1vbi5tb3JhZXNAaW50ZWdyaXRhcy5uZXQBYXV0aD1CZWFyZXIgAQE=
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ=="
    SERVER -> CLIENT: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
    SMTP ERROR: AUTH command failed: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
    SMTP Error: Could not authenticate.
    CLIENT -> SERVER: QUIT
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "535-5.7.8 Username and Password not accepted. Learn more at"
    SMTP -> get_lines(): $data is "535-5.7.8 Username and Password not accepted. Learn more at"
    SMTP -> get_lines(): $str is "535 5.7.8 https://support.google.com/mail/?p=BadCredentials n69sm2379861ita.0 - gsmtp"
    SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials n69sm2379861ita.0 - gsmtp
    SMTP ERROR: QUIT command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials n69sm2379861ita.0 - gsmtp
    Connection: closed
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    

    Any tips?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Noor Alam

    (@naa986)

    Hi, This issue was reported by a few users as well. So this time I want to investigate it. Please do the following:

    1) Go to the Revoke Access tab and do the steps (This will allow you to Grant Access again)
    2) Go back to the General tab and click on the Grant Access button. It should open the consent screen.
    3) Don’t click on the Allow button. Simply copy the URL from the address bar and paste here so I can investigate it.

    • This reply was modified 8 years, 1 month ago by Noor Alam.
    • This reply was modified 8 years, 1 month ago by Noor Alam.

    following… same issue.

    Fixed it on this end by deleting the plugin, deactivating the approval, and deleting the credentials and then starting over. The second time around, it worked.

    It may have something to do with the first time through setting up the Oauth in Google with a distribution list address it allowed me to choose instead of my main account. It did not give me that option the next time through for some reason. This is just a guess.

    In the process, I came across a few PHP errors when trying to save the general settings in the plugin, where it didn’t seem to handle a bad response coming back from google when a token was requested.

    I had the same problem. After reading crookedchimney’s solution, I was able to solve the issue by revoking access and then re-establishing.

    works crookedchimney solution. especially on the re-creation of credentials.

    jhacking1

    (@jhacking1)

    I have tried revoking and reauthorizing. I have deleted everything out and installed again. Still get “SMTP Error: Could not authenticate.”
    The only thing that I can see that is different from the what other people are posting is that they are connecting through “250-smtp.gmail.com” but my test is using “220-srv.servername.com” (servername is not the actual domain)
    Any ideas on how to switch it to “250-smtp.gmail.com”?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘getting Username and Password not accepted with TLS and SSL’ is closed to new replies.