I tried this with Verizon and Gmail. Both servers denied authentication. Gmail emailed me that it denied a login attempt because the connection was not using "modern security".
I would like to know how I can use modern security with this logging handler.
logging.handlers.SMTPHandler(mailhost=('', 25),
fromaddr='',
toaddrs='',
subject='',
credentials=('username','password'),
secure=())
Gmail problem:
Verizon problem:
smtp.verizon.net
, is one such example.SMTPHandler
does not support SMTPS by default. You can monkeypatch the functionality.Solution:
Then set it
The default /logging/handlers.py
logging.handlers.SMTPHandler.emit
functionThe edited emit function