do cc list from smtplib

Tim Williams (gmail) tdwdotnet at gmail.com
Fri Oct 21 12:09:55 CEST 2005


On 21/10/05, Steve Holden <steve at holdenweb.com> wrote:

>
> Assuming that TO and CC are single addresses it would be saner to use:
>

:)

Assuming that the envelope TOs (inc CCs) are the same as the
Header-TOs and Header-CCs

Actually,  I think this would be safer !

> def email(HOST,FROM,TO,CC, RECIPS, SUBJECT,BODY):
..
..
..
          server.sendmail(FROM,RECIPS,body)

RECIPS = list of SMTP recipients
TO & CC = Text representation of some/all/none of the SMTP recipients
and/or other text

RECIPS should be either a single address as a string *or* a list
containing 1 or more addresses



More information about the Python-list mailing list