- October 21, 2013
- Not specified
- 0 (after 0 ratings)
The backend lets you quickly get an idea of all emails that are sent out. Helpful for debugging or keeping an archive of all communications. Use instead of Django's SMTPBackend.
1 2 3 4 5 6 7 8 9 10 11 12
from django.core.mail.backends.smtp import EmailBackend BCC_ADDRESS = '[email protected]' class BCCEmailBackend(EmailBackend): def _send(self, email_message): if not email_message.bcc: email_message.bcc = [BCC_ADDRESS, ] super(BCCEmailBackend, self)._send(email_message)
More like this
- Image compression before saving the new model / work with JPG, PNG by Schleidens 1 week ago
- Help text hyperlinks by sa2812 1 month ago
- Stuff by NixonDash 3 months, 1 week ago
- Add custom fields to the built-in Group model by jmoppel 5 months, 1 week ago
- Month / Year SelectDateWidget based on django SelectDateWidget by pierreben 8 months, 3 weeks ago
Please login first before commenting.