[Email-SIG] question on "cc" and "bcc"

Mark Pettit markpettit at verifaction.com
Wed Sep 1 11:51:50 CEST 2004


Dear Email Pythonistas,

I am battling to get email sent to persons via "cc" and "bcc".   Sadly the documentation does not give specific examples on this, but 12.2.13 does give some small clues.

Using the examples, I have extended them slightly as follows :

# snip snip =====================
msg['Subject'] = 'The contents of %s' % textfile
msg['From'] = me
msg['To'] = you
msg['cc'] = cclist                      # first mod
msg['bcc'] = bcclist                    # second mod

# Send the message via our own SMTP server, but don't include the
# envelope header.
s = smtplib.SMTP()
s.connect()
s.sendmail(me, [you], msg.as_string())
s.close()
# snip snip ====================

But the intended recipients never get the mail (copy or blind copy).

Does anyone know why the s.sendmail() repeats the "me" and "you", but doesn't do anything with "cc" and "bcc" ?

Has anyone actually done this successfully before - I'm sure that someone has and I've just missed some tiny but crucial point.

regards,

- 
Mark Pettit
VerifAction
Cape Town
South Africa


-- 
Mark Pettit
VerifAction


More information about the Email-SIG mailing list