5👍
✅
I think the easiest way before messing up with middleware or whatever is to simply create a model for your logged emails and add a new record if send was successful.
2👍
Another way to look at it: send the mail to your backup email account ex: backup@yourdomain.com. So you can store the email, check if the email is sent or not.
Other than that, having an extra model for logged emails is a way to go.
2👍
I would suggest making use of an existing django mail app.
django-mailer may do the trick. It has a message log.
I think it is best not to send email directly from views, your views then won’t get blocked if your mail server happens not to be functioning, so that’s another reason to use something like this.
- [Django]-Cannot upload an image in django using ImageField
- [Django]-Does Django 1.10 still need South to manage migrations?
- [Django]-(Djoser) Weird activation email when I update the user fields
Source:stackexchange.com