logging.handlers.SMTPHandler raises smtplib.SMTPAuthenticationError
问题 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=()) 回答1: Gmail problem: Not addressed here. See other answers about Gmail's app authentication. Verizon problem: