multiple email recipients
eight02645999 at yahoo.com
eight02645999 at yahoo.com
Mon Feb 20 04:01:38 EST 2006
hi
i currently am using this email function that can send single email
address
def email(HOST,FROM,TO,SUBJECT,BODY,CC=None):
import smtplib
import string, sys
body = string.join((
"From: %s" % FROM,
"To: %s" % TO,
"Subject: %s" % SUBJECT,
"CC: %s" % CC,
"",
BODY), "\r\n")
server = smtplib.SMTP(HOST)
server.sendmail(FROM, [TO,CC],body)
server.quit()
was wondering how to modify the code so as i can send to multiple email
recipients using "TO"? thanks.
More information about the Python-list
mailing list