E
eight02645999
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.
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.