Score:0

SMTP module cannot connect to smtp.gmail.com

br flag

The SMTP module stopped working about a week ago. It is no longer able to connect to smtp.gmail.com. I have tried commonly recommended remedies:

I am still not able to send emails. This seems to have happened without any changes to the site. The debug output:

SMTP.module is active.
The configuration options have been saved.
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220 smtp.gmail.com ESMTP f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp "
SMTP -> get_lines(): $data was "220 smtp.gmail.com ESMTP f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp "
SMTP -> FROM SERVER: 220 smtp.gmail.com ESMTP f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [66.228.44.53] "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] "
SMTP -> get_lines(): $str is "250-SIZE 35882577 "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 "
SMTP -> get_lines(): $str is "250-8BITMIME "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME "
SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH "
SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES "
SMTP -> get_lines(): $str is "250-PIPELINING "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES 250-PIPELINING "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES 250-PIPELINING "
SMTP -> get_lines(): $str is "250-CHUNKING "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING "
SMTP -> get_lines(): $str is "250 SMTPUTF8 "
SMTP -> get_lines(): $data was "250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8 "
SMTP -> FROM SERVER: 250-smtp.gmail.com at your service, [66.228.44.53] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6 "
SMTP -> get_lines(): $data was "334 VXNlcm5hbWU6 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6 "
SMTP -> get_lines(): $data was "334 UGFzc3dvcmQ6 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs "
SMTP -> get_lines(): $str is "534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX "
SMTP -> get_lines(): $str is "534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> "
SMTP -> get_lines(): $str is "534-5.7.14 Please log in via your web browser and then try again. "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> 534-5.7.14 Please log in via your web browser and then try again. "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> 534-5.7.14 Please log in via your web browser and then try again. "
SMTP -> get_lines(): $str is "534-5.7.14 Learn more at "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at "
SMTP -> get_lines(): $str is "534 5.7.14 https://support.google.com/mail/answer/78754 f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp "
SMTP -> get_lines(): $data was "534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp "
SMTP -> ERROR: Password not accepted from server: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 ayHmWfTW3uH_Y0l9QBdB8thX_D2gyq0cU5Ltn0zJWruuXlc4Bvxyeag-Md22UG22XWJJX 534-5.7.14 kFJOLwtOF7Agw6KdzAL_P3IQZlAY-bSuSgKpM_aD8Rzd7AAIdpfRWkwd9bXW-wWw> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "221 2.0.0 closing connection f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp "
SMTP -> get_lines(): $data was "221 2.0.0 closing connection f19-20020ac859d3000000b002de4d014733sm11933677qtf.13 - gsmtp "
SMTP -> FROM SERVER: @byemsg
SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
Score:1
br flag

I needed to use an app password. This is done at https://myaccount.google.com/security

Before creating an app password, you have to turn on 2-factor authentication for the account.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.