community.general/lib/ansible/modules/notification
guoqiao 6ef9c2d7b7 Fix mail module for python 3.7.0 (#44550) (#44552)
In python 3.7.0, changes in `ssl.py` breaks `smtplib.SMTP_SSL`, which
then breaks `mail` module in ansible.

Run this line in python shell:

    import smtplib;smtplib.SMTP_SSL().connect(host='smtp.gmail.com', port=465)

Before python 3.7.0, we will get:

    (220, b'smtp.gmail.com ESMTP j13-v6sm3086685pgq.56 - gsmtp')

In python 3.7.0, we get such error at `lib/python3.7/ssl.py` line 843, method `_create`:

    ValueError: server_hostname cannot be an empty string or start with a leading dot.

The ssl module is using host info on SMTP_SSL instance, which is not set.
The fix/workaround is simple, just pass host info to it:

    import smtplib;smtplib.SMTP_SSL(host='smtp.gmail.com').connect(host='smtp.gmail.com', port=465)

Fixes: #44550

Signed-off-by: Guo Qiao <guoqiao@gmail.com>
2018-08-23 16:50:54 +10:00
..
__init__.py
_osx_say.py osx_say: add espeak support, rename module to say (#33071) 2017-12-09 13:45:31 +00:00
bearychat.py More validate module fixes (#39097) 2018-04-24 18:05:50 +01:00
campfire.py Bulk autopep8 (modules) 2017-12-07 20:25:55 +00:00
catapult.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
cisco_spark.py Modules metadata: fix invalid GitHub ID in author field (#31856) 2017-11-02 06:52:18 -04:00
flowdock.py More validate module fixes (#39097) 2018-04-24 18:05:50 +01:00
grove.py More validate module fixes (#39097) 2018-04-24 18:05:50 +01:00
hall.py Bulk autopep8 (modules) 2017-12-07 20:25:55 +00:00
hipchat.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
irc.py fix irc module to work with py3 (#42267) 2018-07-10 09:42:14 -04:00
jabber.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
logentries_msg.py Fix shebangs and file modes and update tests. (#40563) 2018-05-22 14:25:36 -07:00
mail.py Fix mail module for python 3.7.0 (#44550) (#44552) 2018-08-23 16:50:54 +10:00
mattermost.py More validate module fixes (#39097) 2018-04-24 18:05:50 +01:00
mqtt.py Update all pypi.python.org URLs to pypi.org (#38988) 2018-05-14 17:41:47 -05:00
nexmo.py More validate module fixes (#39097) 2018-04-24 18:05:50 +01:00
office_365_connector_card.py Doc formatting update for office_365_connector_card.py (#38142) 2018-04-02 16:23:47 -05:00
pushbullet.py Use https for links to ansible.com domains. 2018-04-23 11:33:56 -07:00
pushover.py Bulk autopep8 (modules) 2017-12-07 20:25:55 +00:00
rocketchat.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
say.py Add support for espeak-ng. Closes #42438 2018-07-10 15:53:00 -04:00
sendgrid.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
slack.py [Fix] Commented out Section due to no Quotes (#24258) 2018-05-15 12:20:09 -04:00
snow_record.py Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
syslogger.py Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
telegram.py Update metadata to 1.1 2017-08-15 23:12:08 -07:00
twilio.py Bulk autopep8 (modules) 2017-12-07 20:25:55 +00:00
typetalk.py Update metadata to 1.1 2017-08-15 23:12:08 -07:00