[web2py] Re: gmail smtp and password retrieval
I'm using web2py 2.22.3. My only email settings in db.py are are: ## configure email mail=auth.settings.mailer mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = '@gmail.com' mail.settings.login = '@gmail.com:' The length 16 password is the app password generated by gmail. Emails work, used mainly by auth to send reset-password links. Here's a little python snippet to test your userid / password work with gmail. import imaplib import sys def checkGmail(userid, password): ''' get unread email count and spam count from gmail ''' try: session = imaplib.IMAP4_SSL('imap.gmail.com') session.login(userid, password) session.select() unseen_inbox = len(session.search(None, 'UNSEEN')[1][0].split()) rc = session.select('[Gmail]/Spam') if rc[0] == 'OK': spam = int(rc[1][0]) else: spam = '0' return(True, unseen_inbox, spam) except: print(("Unexpected error:", sys.exc_info())) return (False,) if __name__ == '__main__': print (checkGmail('**@gmail.com', '')) When I run this with the userid and password set in my db.py file I get (True, 30, 5), demonstrating that I can log in to gmail with the userid and app password. Does it work for you? On Thursday, 18 August 2022 at 03:07:40 UTC+1 lucas wrote: > i am using web2py 2.22.5 using the wsgihandler.py handler and nginx under > centos 8 stream all current and updated and rebooted. i don't understand > all of the stuff from massimo > > On Wednesday, August 17, 2022 at 8:54:22 PM UTC-4 lucas wrote: > >> i'm wondering. do i have to retrieve or generate the 16 digit password >> from the app itself. cuz i don't know how to do that since it is purely a >> linux console only interface. >> >> On Wednesday, August 17, 2022 at 12:18:16 PM UTC-4 lucas wrote: >> >>> nope, and i regenerated a new password just to be sure and restarted the >>> server daemons also. just in case appconfig is only loaded once. >>> >>> >>> On Wednesday, August 17, 2022 at 12:15:52 PM UTC-4 Clemens wrote: >>> Hm, one last guess: ssl false, tls true and port 587. On Wednesday, August 17, 2022 at 6:12:50 PM UTC+2 lucas wrote: > nope, that didn't work either. uhm. > > On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: > >> Hmm, should work, since it's the right port for ssl. Maybe setting >> tls to false could make it work, since the tls port is 587. >> >> Have a try! Hope it helps! >> >> Clemens >> >> On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: >> >>> oh, so the latter is still not sending the Lost Password. >>> >>> On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: >>> ok, i turned on 2-step verification, generated 1 password for "App passwords" that gave me a 16 character string which i copied into the password location under private/appconfig.ini: server = smtp.gmail.com:465 sender = profes...@gmail.com login = 'profes...@gmail.com:eakwlqljrsdeyj16' tls= true ssl= true where i changed the login string so i didn't give away my security. so what do you think? lucas On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: > Generate an app password, as follows: > https://support.google.com/mail/answer/185833?hl=en > > This should solve it, hopefully. > > Regards > Clemens > > On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > >> hey one and all, >> >> on May 5th, 2022, gmail imposed the 2 step verification on its >> smtp service. how do we configure web2py to still use our gmail >> accounts >> to send smtp for password retrieval. >> >> thank you in advance, lucas >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/6fea335e-a601-4010-af2e-d30f41645ce9n%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
i am using web2py 2.22.5 using the wsgihandler.py handler and nginx under centos 8 stream all current and updated and rebooted. i don't understand all of the stuff from massimo On Wednesday, August 17, 2022 at 8:54:22 PM UTC-4 lucas wrote: > i'm wondering. do i have to retrieve or generate the 16 digit password > from the app itself. cuz i don't know how to do that since it is purely a > linux console only interface. > > On Wednesday, August 17, 2022 at 12:18:16 PM UTC-4 lucas wrote: > >> nope, and i regenerated a new password just to be sure and restarted the >> server daemons also. just in case appconfig is only loaded once. >> >> >> On Wednesday, August 17, 2022 at 12:15:52 PM UTC-4 Clemens wrote: >> >>> Hm, one last guess: ssl false, tls true and port 587. >>> >>> On Wednesday, August 17, 2022 at 6:12:50 PM UTC+2 lucas wrote: >>> nope, that didn't work either. uhm. On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: > Hmm, should work, since it's the right port for ssl. Maybe setting tls > to false could make it work, since the tls port is 587. > > Have a try! Hope it helps! > > Clemens > > On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: > >> oh, so the latter is still not sending the Lost Password. >> >> On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: >> >>> ok, i turned on 2-step verification, generated 1 password for "App >>> passwords" that gave me a 16 character string which i copied into the >>> password location under private/appconfig.ini: >>> >>> server = smtp.gmail.com:465 >>> sender = profes...@gmail.com >>> login = 'profes...@gmail.com:eakwlqljrsdeyj16' >>> tls= true >>> ssl= true >>> >>> where i changed the login string so i didn't give away my security. >>> so what do you think? >>> lucas >>> >>> On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: >>> Generate an app password, as follows: https://support.google.com/mail/answer/185833?hl=en This should solve it, hopefully. Regards Clemens On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > hey one and all, > > on May 5th, 2022, gmail imposed the 2 step verification on its > smtp service. how do we configure web2py to still use our gmail > accounts > to send smtp for password retrieval. > > thank you in advance, lucas > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/69ccfb74-6afe-454f-ac34-548b9299d516n%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
i'm wondering. do i have to retrieve or generate the 16 digit password from the app itself. cuz i don't know how to do that since it is purely a linux console only interface. On Wednesday, August 17, 2022 at 12:18:16 PM UTC-4 lucas wrote: > nope, and i regenerated a new password just to be sure and restarted the > server daemons also. just in case appconfig is only loaded once. > > > On Wednesday, August 17, 2022 at 12:15:52 PM UTC-4 Clemens wrote: > >> Hm, one last guess: ssl false, tls true and port 587. >> >> On Wednesday, August 17, 2022 at 6:12:50 PM UTC+2 lucas wrote: >> >>> nope, that didn't work either. uhm. >>> >>> On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: >>> Hmm, should work, since it's the right port for ssl. Maybe setting tls to false could make it work, since the tls port is 587. Have a try! Hope it helps! Clemens On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: > oh, so the latter is still not sending the Lost Password. > > On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: > >> ok, i turned on 2-step verification, generated 1 password for "App >> passwords" that gave me a 16 character string which i copied into the >> password location under private/appconfig.ini: >> >> server = smtp.gmail.com:465 >> sender = profes...@gmail.com >> login = 'profes...@gmail.com:eakwlqljrsdeyj16' >> tls= true >> ssl= true >> >> where i changed the login string so i didn't give away my security. >> so what do you think? >> lucas >> >> On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: >> >>> Generate an app password, as follows: >>> https://support.google.com/mail/answer/185833?hl=en >>> >>> This should solve it, hopefully. >>> >>> Regards >>> Clemens >>> >>> On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: >>> hey one and all, on May 5th, 2022, gmail imposed the 2 step verification on its smtp service. how do we configure web2py to still use our gmail accounts to send smtp for password retrieval. thank you in advance, lucas >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/6d03f139-d712-4d2d-ab07-fb32f3ab901bn%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
nope, and i regenerated a new password just to be sure and restarted the server daemons also. just in case appconfig is only loaded once. On Wednesday, August 17, 2022 at 12:15:52 PM UTC-4 Clemens wrote: > Hm, one last guess: ssl false, tls true and port 587. > > On Wednesday, August 17, 2022 at 6:12:50 PM UTC+2 lucas wrote: > >> nope, that didn't work either. uhm. >> >> On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: >> >>> Hmm, should work, since it's the right port for ssl. Maybe setting tls >>> to false could make it work, since the tls port is 587. >>> >>> Have a try! Hope it helps! >>> >>> Clemens >>> >>> On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: >>> oh, so the latter is still not sending the Lost Password. On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: > ok, i turned on 2-step verification, generated 1 password for "App > passwords" that gave me a 16 character string which i copied into the > password location under private/appconfig.ini: > > server = smtp.gmail.com:465 > sender = profes...@gmail.com > login = 'profes...@gmail.com:eakwlqljrsdeyj16' > tls= true > ssl= true > > where i changed the login string so i didn't give away my security. > so what do you think? > lucas > > On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: > >> Generate an app password, as follows: >> https://support.google.com/mail/answer/185833?hl=en >> >> This should solve it, hopefully. >> >> Regards >> Clemens >> >> On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: >> >>> hey one and all, >>> >>> on May 5th, 2022, gmail imposed the 2 step verification on its smtp >>> service. how do we configure web2py to still use our gmail accounts to >>> send smtp for password retrieval. >>> >>> thank you in advance, lucas >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/e4604d1b-8760-46c5-8e91-d8ea8e5002ebn%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
Hm, one last guess: ssl false, tls true and port 587. On Wednesday, August 17, 2022 at 6:12:50 PM UTC+2 lucas wrote: > nope, that didn't work either. uhm. > > On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: > >> Hmm, should work, since it's the right port for ssl. Maybe setting tls to >> false could make it work, since the tls port is 587. >> >> Have a try! Hope it helps! >> >> Clemens >> >> On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: >> >>> oh, so the latter is still not sending the Lost Password. >>> >>> On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: >>> ok, i turned on 2-step verification, generated 1 password for "App passwords" that gave me a 16 character string which i copied into the password location under private/appconfig.ini: server = smtp.gmail.com:465 sender = profes...@gmail.com login = 'profes...@gmail.com:eakwlqljrsdeyj16' tls= true ssl= true where i changed the login string so i didn't give away my security. so what do you think? lucas On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: > Generate an app password, as follows: > https://support.google.com/mail/answer/185833?hl=en > > This should solve it, hopefully. > > Regards > Clemens > > On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > >> hey one and all, >> >> on May 5th, 2022, gmail imposed the 2 step verification on its smtp >> service. how do we configure web2py to still use our gmail accounts to >> send smtp for password retrieval. >> >> thank you in advance, lucas >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/bdb7114d-8fa6-460f-be91-b7e4091f4420n%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
nope, that didn't work either. uhm. On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: > Hmm, should work, since it's the right port for ssl. Maybe setting tls to > false could make it work, since the tls port is 587. > > Have a try! Hope it helps! > > Clemens > > On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: > >> oh, so the latter is still not sending the Lost Password. >> >> On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: >> >>> ok, i turned on 2-step verification, generated 1 password for "App >>> passwords" that gave me a 16 character string which i copied into the >>> password location under private/appconfig.ini: >>> >>> server = smtp.gmail.com:465 >>> sender = profes...@gmail.com >>> login = 'profes...@gmail.com:eakwlqljrsdeyj16' >>> tls= true >>> ssl= true >>> >>> where i changed the login string so i didn't give away my security. so >>> what do you think? >>> lucas >>> >>> On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: >>> Generate an app password, as follows: https://support.google.com/mail/answer/185833?hl=en This should solve it, hopefully. Regards Clemens On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > hey one and all, > > on May 5th, 2022, gmail imposed the 2 step verification on its smtp > service. how do we configure web2py to still use our gmail accounts to > send smtp for password retrieval. > > thank you in advance, lucas > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/4709c677-b378-426f-9c08-7e2e4f231c03n%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
Hmm, should work, since it's the right port for ssl. Maybe setting tls to false could make it work, since the tls port is 587. Have a try! Hope it helps! Clemens On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: > oh, so the latter is still not sending the Lost Password. > > On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: > >> ok, i turned on 2-step verification, generated 1 password for "App >> passwords" that gave me a 16 character string which i copied into the >> password location under private/appconfig.ini: >> >> server = smtp.gmail.com:465 >> sender = profes...@gmail.com >> login = 'profes...@gmail.com:eakwlqljrsdeyj16' >> tls= true >> ssl= true >> >> where i changed the login string so i didn't give away my security. so >> what do you think? >> lucas >> >> On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: >> >>> Generate an app password, as follows: >>> https://support.google.com/mail/answer/185833?hl=en >>> >>> This should solve it, hopefully. >>> >>> Regards >>> Clemens >>> >>> On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: >>> hey one and all, on May 5th, 2022, gmail imposed the 2 step verification on its smtp service. how do we configure web2py to still use our gmail accounts to send smtp for password retrieval. thank you in advance, lucas >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/790d0433-493d-4d1d-88bb-526e32eb0a3en%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
oh, so the latter is still not sending the Lost Password. On Wednesday, August 17, 2022 at 11:54:38 AM UTC-4 lucas wrote: > ok, i turned on 2-step verification, generated 1 password for "App > passwords" that gave me a 16 character string which i copied into the > password location under private/appconfig.ini: > > server = smtp.gmail.com:465 > sender = profes...@gmail.com > login = 'profes...@gmail.com:eakwlqljrsdeyj16' > tls= true > ssl= true > > where i changed the login string so i didn't give away my security. so > what do you think? > lucas > > On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: > >> Generate an app password, as follows: >> https://support.google.com/mail/answer/185833?hl=en >> >> This should solve it, hopefully. >> >> Regards >> Clemens >> >> On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: >> >>> hey one and all, >>> >>> on May 5th, 2022, gmail imposed the 2 step verification on its smtp >>> service. how do we configure web2py to still use our gmail accounts to >>> send smtp for password retrieval. >>> >>> thank you in advance, lucas >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/4abd80d6-33a4-4ae8-9c8d-bfe192945357n%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
ok, i turned on 2-step verification, generated 1 password for "App passwords" that gave me a 16 character string which i copied into the password location under private/appconfig.ini: server = smtp.gmail.com:465 sender = professor8...@gmail.com login = 'professor8...@gmail.com:eakwlqljrsdeyj16' tls= true ssl= true where i changed the login string so i didn't give away my security. so what do you think? lucas On Wednesday, August 17, 2022 at 11:34:58 AM UTC-4 Clemens wrote: > Generate an app password, as follows: > https://support.google.com/mail/answer/185833?hl=en > > This should solve it, hopefully. > > Regards > Clemens > > On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > >> hey one and all, >> >> on May 5th, 2022, gmail imposed the 2 step verification on its smtp >> service. how do we configure web2py to still use our gmail accounts to >> send smtp for password retrieval. >> >> thank you in advance, lucas >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/b318b96f-76c1-4de4-9293-87d35fdb1de8n%40googlegroups.com.
[web2py] Re: gmail smtp and password retrieval
Generate an app password, as follows: https://support.google.com/mail/answer/185833?hl=en This should solve it, hopefully. Regards Clemens On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > hey one and all, > > on May 5th, 2022, gmail imposed the 2 step verification on its smtp > service. how do we configure web2py to still use our gmail accounts to > send smtp for password retrieval. > > thank you in advance, lucas > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/ddb52ee9-f186-4359-80ef-6bcd90ef2b9bn%40googlegroups.com.