Sending email through gmail account: no SSL support

1,284 views
Skip to first unread message

Marty Jones

unread,
Feb 29, 2016, 10:39:45 AM2/29/16
to web2py-users
I'm trying to send an email using web2py's auth mailer. I've set an application specific password and am using that and my gmail info in the code below:
mail = auth.settings.mailer
mail
.settings.server = 'smtp.gmail.com:587'
mail
.settings.sender = 'em...@gmail.com'
mail
.settings.login = 'em...@gmail.com:password'


I'm getting an error back when trying to send an email:
2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No SSL support included in this Python

Anyone experienced this and know how to work around it?

Using port 465 instead results in this error:
2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:Connection unexpectedly closed: timed out


Niphlod

unread,
Feb 29, 2016, 3:20:00 PM2/29/16
to web2py-users
what python are you using ?

Marty Jones

unread,
Feb 29, 2016, 4:57:58 PM2/29/16
to web2py-users
2.7.11

Niphlod

unread,
Feb 29, 2016, 5:15:53 PM2/29/16
to web2py-users
with or without ssl support ? did you compile it yourself ?

Marty Jones

unread,
Feb 29, 2016, 6:36:16 PM2/29/16
to web2py-users
I can't recall at this point, but just ran:

>>> import socket
>>> hasattr(socket, "ssl")

which returned True

Niphlod

unread,
Mar 1, 2016, 4:32:43 AM3/1/16
to web2py-users
what if you just

import ssl 

?

which environment are you in (os details) ?

Marty Jones

unread,
Mar 1, 2016, 4:29:59 PM3/1/16
to web...@googlegroups.com
That works fine as well.

I'm on windows 10.

Leonel Câmara

unread,
Mar 1, 2016, 7:53:05 PM3/1/16
to web2py-users
Have you allowed insecure apps on this gmail's google account?

Niphlod

unread,
Mar 2, 2016, 3:24:21 AM3/2/16
to web2py-users
uhm. this error 

:No SSL support included in this Python

is an early exit on smptlib . not at all web2py related: SO is riddled with same error, and all points to not having SSL available...

Michele Comitini

unread,
Mar 2, 2016, 5:05:34 PM3/2/16
to web...@googlegroups.com
that problem could be simply related to python process not finding the openssl shared lib at runtime.  So the module can be imported, but the socket cannot work with ssl.

--
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages