summaryrefslogtreecommitdiff
path: root/postgresqleu/mailqueue/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'postgresqleu/mailqueue/util.py')
-rw-r--r--postgresqleu/mailqueue/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/postgresqleu/mailqueue/util.py b/postgresqleu/mailqueue/util.py
index 65ad3e12..dc09af6f 100644
--- a/postgresqleu/mailqueue/util.py
+++ b/postgresqleu/mailqueue/util.py
@@ -6,7 +6,7 @@ from email import encoders
from models import QueuedMail
-def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None):
+def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, bcc=None):
# attachment format, each is a tuple of (name, mimetype,contents)
# content should be *binary* and not base64 encoded, since we need to
# use the base64 routines from the email library to get a properly
@@ -31,6 +31,9 @@ def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None):
# Just write it to the queue, so it will be transactionally rolled back
QueuedMail(sender=sender, receiver=receiver, fullmsg=msg.as_string()).save()
+ # Any bcc is just entered as a separate email
+ if bcc:
+ QueuedMail(sender=sender, receiver=bcc, fullmsg=msg.as_string()).save()
def send_mail(sender, receiver, fullmsg):
# Send an email, prepared as the full MIME encoded mail already