A
Alex Hunsley
I'm using the smtp module to send emails from python.
I would like to specify several recipients of the email like follows:
msg = MIMEText(time.ctime("Body text of email")
me = '(e-mail address removed)'
you = '(e-mail address removed),[email protected]'
msg['Subject'] = '*** Carwatch alert'
msg['From'] = me
msg['To'] = you
# Send the message via our own SMTP server, but don't include the
# envelope header.
# s = smtplib.SMTP('smtp.ednet.co.uk')
s = smtplib.SMTP('192.168.1.105')
# s.connect()
s.sendmail(me, [you], msg.as_string())
... when I execute this code, only (e-mail address removed) gets the email.
Is there a way to specifiy multiple addresses in the To field?
thanks
alex
I would like to specify several recipients of the email like follows:
msg = MIMEText(time.ctime("Body text of email")
me = '(e-mail address removed)'
you = '(e-mail address removed),[email protected]'
msg['Subject'] = '*** Carwatch alert'
msg['From'] = me
msg['To'] = you
# Send the message via our own SMTP server, but don't include the
# envelope header.
# s = smtplib.SMTP('smtp.ednet.co.uk')
s = smtplib.SMTP('192.168.1.105')
# s.connect()
s.sendmail(me, [you], msg.as_string())
... when I execute this code, only (e-mail address removed) gets the email.
Is there a way to specifiy multiple addresses in the To field?
thanks
alex