smtplib
Steve Purcell
stephen_purcell at yahoo.com
Mon Apr 16 05:34:38 EDT 2001
Mark Rowe wrote:
> Hello,
>
> what is the correct format for sending the same message to multiple people,
> through either multiple to addresses, or cc addresses?
>From the library docs:
sendmail (from_addr, to_addrs, msg[, mail_options, rcpt_options])
Send mail. The required arguments are an RFC 822 from-address
string, a list of RFC 822 to-address strings, and a message string.
So you can pass a sequence of strings as the 'to_addrs' argument:
s.sendmail('me at here.com',('you at there.com','him at elsewhere.com'),msg)
-Steve
--
Steve Purcell, Pythangelist
Get testing at http://pyunit.sourceforge.net/
Any opinions expressed herein are my own and not necessarily those of Yahoo
More information about the Python-list
mailing list