Python, Unix sendmail, and multiple recipients
Emile van Sebille
emile at fenx.com
Tue Oct 16 12:53:29 EDT 2001
I hacked this out of functioning code, so I may have missed something, but
this should help get you started.
import smtplib
server = smtplib.SMTP('10.0.0.253')
fromaddr = "emile at fenx.com"
msg = "From: %s\nReply-To: %s\nSubject: %s \
% ("Wendy Gorxly","wgorxly at fenx.com","Automated Daily Sales Pricing")
pricingMsg = dailySales(REQUEST=REQUEST)
msg = msg + pricingMsg + '\n\n'
addrs = ["MikeMx at aol.com",
"John at fenx.com",
"kclelland at fenx.com",
"scohaml at fenx.com",
"skhand at fenx.com",
]
server.sendmail(fromaddr, addrs, msg)
server.quit()
--
Emile van Sebille
emile at fenx.com
---------
"Kemp Randy-W18971" <Randy.L.Kemp at motorola.com> wrote in message
news:mailman.1003248016.6467.python-list at python.org...
> Can anyone give me an example of how to invoke the Unix sendmail in
Python,
> and send an email message to more then one recipient (two people, for
> example)?
>
More information about the Python-list
mailing list