• Resolved develhem

    (@develhem)


    Hello, i use your plugin since many time but, i have a big problem now. When i execute an action sending an email (forgot password, test mail from smtp panel, ect.), i have this pretty message :

    Fatal error: Uncaught LogicException: refresh token must be passed in or set as part of setAccessToken in /wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php:267 Stack trace: #0 /wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php(255): Google_Client->fetchAccessTokenWithRefreshToken(NULL) #1 /wp-content/plugins/gmail-smtp/class.phpmaileroauthgoogle.php(144): Google_Client->refreshToken(NULL) #2 /wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php(475): GmailXOAuth2->getOauth64() #3 /wp-content/plugins/gmail-smtp/class.phpmaileroauth.php(152): SMTP->authenticate(”, ”, ‘XOAUTH2’, ”, ”, Object(GmailXOAuth2)) #4 /wp-content/plugins/gmail-smtp/PHPMailer/class.phpmailer.php(1542): PHPMailerOAu in /wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php on line 267

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

    (@naa986)

    @develhem, Try doing a fresh authorization and see how it goes: https://wphowto.net/gmail-smtp-plugin-for-wordpress-1341

    Same issue. My error message below. When we have gone through the dance of creating client ID etc (Google’s design of this UI sucks), why is your plugin trying to initiate “username and password” stuff?

    2019-10-03 16:14:44 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    2019-10-03 16:14:44 Connection: opened
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is ""
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "220 smtp.gmail.com ESMTP n10sm1893467ilh.53 - gsmtp"
    2019-10-03 16:14:45 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP n10sm1893467ilh.53 - gsmtp
    2019-10-03 16:14:45 CLIENT -> SERVER: EHLO MYDOMAIN.COM
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is ""
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-SIZE 35882577"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-8BITMIME"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-STARTTLS"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-STARTTLS"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-PIPELINING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-CHUNKING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250 SMTPUTF8"
    2019-10-03 16:14:45 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    2019-10-03 16:14:45 CLIENT -> SERVER: STARTTLS
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is ""
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "220 2.0.0 Ready to start TLS"
    2019-10-03 16:14:45 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
    2019-10-03 16:14:45 CLIENT -> SERVER: EHLO MYDOMAIN.COM
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is ""
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-SIZE 35882577"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-8BITMIME"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-PIPELINING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250-CHUNKING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    2019-10-03 16:14:45 SMTP -> get_lines(): $str is "250 SMTPUTF8"
    2019-10-03 16:14:45 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2604:a880:cad:d0::6870:2001]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    2019-10-03 16:14:45 Auth method requested: XOAUTH2
    2019-10-03 16:14:45 Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
    2019-10-03 16:14:46 CLIENT -> SERVER: AUTH XOAUTH2 dXNlcj1pbmZvQGVzdGRvY3MuY29tAWF1dGg9QmVhcmVyIAEB
    2019-10-03 16:14:46 SMTP -> get_lines(): $data is ""
    2019-10-03 16:14:46 SMTP -> get_lines(): $str is "334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ=="
    2019-10-03 16:14:46 SERVER -> CLIENT: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
    2019-10-03 16:14:46 SMTP ERROR: AUTH command failed: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
    SMTP Error: Could not authenticate.
    2019-10-03 16:14:46 CLIENT -> SERVER: QUIT
    2019-10-03 16:14:46 SMTP -> get_lines(): $data is ""
    2019-10-03 16:14:46 SMTP -> get_lines(): $str is "535-5.7.8 Username and Password not accepted. Learn more at"
    2019-10-03 16:14:46 SMTP -> get_lines(): $data is "535-5.7.8 Username and Password not accepted. Learn more at"
    2019-10-03 16:14:46 SMTP -> get_lines(): $str is "535 5.7.8 https://support.google.com/mail/?p=BadCredentials n10sm1893467ilh.53 - gsmtp"
    2019-10-03 16:14:46 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials n10sm1893467ilh.53 - gsmtp
    2019-10-03 16:14:46 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 n10sm1893467ilh.53 - gsmtp
    2019-10-03 16:14:46 Connection: closed
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    • This reply was modified 4 years, 6 months ago by morespinach.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gmail smtp php error’ is closed to new replies.