This works OK, EXCEPT that the Bcc email addresses are not hidden. How do I hide them?
Edit: This question appears to have been asked before, but none of the answers specifically anwswer the question of why the the Bcc'd email addresses are not hidden, even though they are delivered correctly.
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
import smtplib
msg = MIMEMultipart()
msg["Subject"] = "Example"
msg["From"] = "me@example.com"
msg["To"] = "undisclosed@example.com"
msg["Bcc"] = "hidden1@example.com, hidden2@example.com"
body = MIMEText("example email body")
msg.attach(body)
smtp = smtplib.SMTP("mailhost.example.com", 25)
smtp.sendmail( msg['From'], [ msg['To'], msg['Bcc'] ], msg.as_string() )
smtp.quit()