Email backend to BCC all emails

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from django.core.mail.backends.smtp import EmailBackend

BCC_ADDRESS = 'bcc@example.com'


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

  1. email backend which use sendmail subprocess by pawnhearts 4 years, 3 months ago
  2. Login with email or username by zeeg 5 years, 7 months ago
  3. Email or username authentication with masquerading by petrilli 4 years, 9 months ago
  4. Render to email by bl4th3rsk1t3 4 years, 11 months ago
  5. Use email addresses for user name for django 1.3 by kidzik 2 years, 10 months ago

Comments

(Forgotten your password?)