Multi Recipients With smtplib?

Dennis Lee Bieber wlfraed at ix.netcom.com
Mon Nov 25 14:38:53 EST 2002


John Abel fed this fish to the penguins on Monday 25 November 2002 
07:14 am:

> Sorry for the confusing question, but you got the gist of it (Phew!).
>  I'm pulling the list of addresses out of .ini file, e.g.
> 
> mailfrom=me at mydomain.org
> mailto=you at yourdomain.org,me at myotherdomain.org
> 
> Basically, what I was doing, was passing the mailto value to
> .sendmail().  The header seem correct (viewed via Mozilla, with
> headers set to all), which is what was confusing me.
>
        The "header" is transparent to actual SMTP interfacing. The actual 
SMTP handshake would look like:

HELO mydomain.name
MAIL FROM: from at address
RCPT TO: address at one
RCPT TO: address at two
...
DATA

        By just using a comma separated string you are generating a single

RCPT TO: address at one, address at two...

which is not accepted.


        Most email clients do extract the recipient addresses from the 
"envelope" headers, but that is convenience. One could generate

RCPT TO: address at one
RCPT TO: address at two
...
RCPT TO: address at fifty
DATA
From: you at localhost
To: addresses at world
Subject: Trace this spam

If you can!
.
QUIT


-- 
 > ============================================================== <
 >   wlfraed at ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed at dm.net     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page: http://www.beastie.dm.net/         <
 >            Home Page: http://www.dm.net/~wulfraed/             <




More information about the Python-list mailing list