Emailing in Python

P

Philippe Reynolds

Hi,

I'm learning python...one of my tasks is to send out emails...
I can send emails to one person at a time but not as groups....

Do you think you can help.

Cheers
Philippe Reynolds

Here is the section of code:
# me == the sender's email address
me = '(e-mail address removed)'
# you == the recipient's email address

email_list= '(e-mail address removed), (e-mail address removed)'

msg['Subject'] = 'EVENT REPORT'
msg['From'] = me
msg['To'] = email_list

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top