如题所述
有,使用 logging.handlers.SMTPHandler,SMTP和logging模块都需要自己配置。
如果使用163邮箱发信,这个handler可以这样配置:
具体怎么集成到你的logging配置,取决于你用的fileConfig, dictConfig还是别的。反正都可以配上去就是了。