Problem sending mails in web2py: Mail.send failure:[SSL: WRONG_VERSION_NUMBER]

Skip to first unread message

VJ Sosa

unread,
May 20, 2020, 9:03:34 AM5/20/20
to web2py-users
Dear all,

I'm using the library to manage users in web2py (it includes functions such as login, profle, lost_password, etc..).
When I try to use the function lost_password, it ask for my email to send me the password, but
it can not send the email. It shows the message "Unable to send email",
the log states:

WARNING:web2py:Mail.send failure:[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:852)

I'm using the configuration  ( appconfig.ini) file with this information: 

[smtp]
login  = myuser:mypassword
tls    = true
ssl    = true

I'm not sure if this is an issue with the python library or if I'm missing something .
Any ideas?

Thansk in advance for any support!

Víctor.

Dave S

unread,
May 26, 2020, 9:42:44 PM5/26/20
to web2py-users
This sounds like a different error than I've seen in the forum before, but gmail two-factor authentication has been an issue for some users.  There is something in the gmail options that can be turned off on a per-app basis, if you trust my memory which you shouldn't.

There are other mail servers available, some of which are free for small volumes of mail (IIRC, BICBW) and some of which are suitable for bulk mailings (legitimate ones, of course).

/dps
 

VJ Sosa

unread,
May 27, 2020, 3:18:52 AM5/27/20
to web...@googlegroups.com
Dear Dave,

Thanks for your reply.
I could fix my issue modifying the smtp server port to 465. Since the problem was related to the use of SSL, Google prefers the use of 465 port for SSL.
[smtp]
server = smtp.gmail.com:465
login  = myuser:mypassword
tls    = true
ssl    = true

And you right, I had also to change, in my google account, an option to activate the use of  less secure apps. Maybe this is not the safe way to solve this issue, but it works for me. You can On/Off the use of less secure apps in your Google account at:
https://myaccount.google.com/lesssecureapps
in Security section.  

More information about it can be found here:

Best regards,
Víctor

--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/hwnv_A3sdtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/752f15b6-8837-4862-a866-f6804d064990%40googlegroups.com.


--
Victor J. Sosa Sosa

Dave S

unread,
May 30, 2020, 5:47:11 AM5/30/20
to web2py-users


On Wednesday, May 27, 2020 at 12:18:52 AM UTC-7, VJ Sosa wrote:
Dear Dave,

Thanks for your reply.
I could fix my issue modifying the smtp server port to 465. Since the problem was related to the use of SSL, Google prefers the use of 465 port for SSL.

Glad you figured it out, and now we have something for the archives.

/dps
 
To unsubscribe from this group and all its topics, send an email to web...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages