How can I log all outgoing email in Django?

前端 未结 4 2067
你的背包
你的背包 2021-02-20 00:16

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 00:46

    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..

提交回复
热议问题