• Madman
  • ·

Python使用logging模块的SMTPHandl...

如果你想使用 Python 的内置模块 logging 中的 SMTPHandler 将出错时的日志,通过邮件的方式发送给管理员的话,可能你会遇到很多坑,本文将解决诸如 socket.timeout: timed out 和 smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out 等错误,亲测有效