﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18582	Emails not being sent to bcc addresses	javi.azuaga@…	nobody	"First things first: this is the first bug I report, so please excuse me and point me in the right direction if I'm making something wrong.

Now, to the bug. Sending an email with both EmailMessage and EmailMultiAlternatives to BCC addresses fails.
I've tried this on my development machine (Archlinux), on a fresh Kubuntu 12.04 virtualbox install and on a Webfaction server, both with the default IMAP backend and the Console backend, with Python 2.7 and both Django 1.3 and 1.4 installed both on fresh virtualenvs and then removed and installed as system packages.

I experience this problem on several big proyects as well as on fresh project with just a view.

This is the simplest code test I've make and it's output to the Console backend:

views.py:
{{{
from django.core.mail import EmailMessage, EmailMultiAlternatives
from django.http import HttpResponse

def index(request):
    
    msg = EmailMessage(
        subject='test',
        to=['me@example.org'],
        bcc=['nowhere@example.org'],
        body='test'
    )
    msg.send()
    
    msg = EmailMultiAlternatives(
        subject='test',
        to=['me@example.org'],
        bcc=['nowhere@example.org'],
        body='test'
    )
    msg.send()
    
    return HttpResponse(""Testing..."")
}}}

Output for both Django 1.4 and 1.3, notice how bcc doesn't appear:

{{{
Content-Type: text/plain; charset=""utf-8""
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Subject: test
From: webmaster@localhost
To: me@example.org
Date: Fri, 06 Jul 2012 12:26:54 -0000
Message-ID: <20120706122654.9417.52070@i5-750>

test
-------------------------------------------------------------------------------
Content-Type: text/plain; charset=""utf-8""
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Subject: test
From: webmaster@localhost
To: me@example.org
Date: Fri, 06 Jul 2012 12:26:54 -0000
Message-ID: <20120706122654.9417.77135@i5-750>

test
-------------------------------------------------------------------------------
[06/Jul/2012 07:26:54] ""GET / HTTP/1.1"" 200 10
}}}

This is the output of the MTA from webfaction's log:

{{{
Jul 5 11:15:56 mail6 postfix/smtpd[24001]: 1A216210E8AE: client=web317.webfaction.com[85.17.23.88], sasl_method=CRAM-MD5, sasl_username=batlles@smtp.webfaction.com
Jul 5 11:15:56 mail6 postfix/cleanup[23507]: 1A216210E8AE: message-id=<20120705161555.19081.91290@web317.webfaction.com>
Jul 5 11:15:56 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 11:16:26 mail6 postfix/smtp[23745]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=30, delays=0.39/0/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 11:46:05 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 11:47:00 mail6 postfix/smtp[25697]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=1864, delays=1809/25/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 12:19:22 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 12:20:02 mail6 postfix/smtp[27946]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=3847, delays=3806/10/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 13:26:00 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 13:27:00 mail6 postfix/smtp[4785]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=7864, delays=7804/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 14:49:20 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 14:50:08 mail6 postfix/smtp[16526]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=12853, delays=12804/18/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 16:12:40 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 16:13:40 mail6 postfix/smtp[23562]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=17864, delays=17804/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 17:36:00 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 17:37:00 mail6 postfix/smtp[2988]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=22864, delays=22804/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 18:59:20 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 19:00:11 mail6 postfix/smtp[11827]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=27856, delays=27804/30/21/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection refused)
Jul 5 20:22:42 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 20:23:41 mail6 postfix/smtp[18908]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=32865, delays=32806/28/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 21:46:00 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 21:47:00 mail6 postfix/smtp[28019]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=37864, delays=37804/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 5 23:09:20 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 5 23:10:02 mail6 postfix/smtp[6562]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=42846, delays=42805/32/9.3/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection refused)
Jul 6 00:32:40 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 6 00:33:40 mail6 postfix/smtp[15683]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=47865, delays=47805/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 6 01:56:00 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 6 01:57:00 mail6 postfix/smtp[24233]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=52864, delays=52804/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
Jul 6 03:19:20 mail6 postfix/qmgr[3022]: 1A216210E8AE: from=<direccion@cremaycosmeticanatural.es>, size=1416, nrcpt=1 (queue active)
Jul 6 03:20:21 mail6 postfix/smtp[315]: 1A216210E8AE: to=<test@example.org>, relay=none, delay=57865, delays=57805/30/30/0, dsn=4.4.1, status=deferred (connect to example.org[192.0.43.10]: Connection timed out)
}}}

If there is any other log or information I can provide, please just tell me to, I'll be more than happy to track this thing down as I've been looking at it for two days now."	Uncategorized	closed	Core (Mail)	1.4	Normal	invalid	bcc, mail		Unreviewed	0	0	0	0	0	0
