How can I log all outgoing email in Django?

前端 未结 4 2249
被撕碎了的回忆
被撕碎了的回忆 2021-02-20 00:28

My Django application sends out quite a bit of emails and I\'ve tried testing it thoroughly. However, for the first few months, I\'d like to log all outgoing emails to ensure th

4条回答
  •  醉酒成梦
    2021-02-20 01:08

    I do not know if there exists a module that works this way, but writing a custom one is a piece of cake. Just create a separate model and every time you send an email, create a new instance ( use a custom method for email sending ). Then, link this model with the admin and bingo..

提交回复
热议问题