Using smtplib

Dennis Lee Bieber wlfraed at ix.netcom.com
Fri Mar 10 22:54:14 EST 2000


On Fri, 10 Mar 2000 17:12:20 +0000, David Boddie
<davidb at dcs.st-and.ac.uk> declaimed the following in comp.lang.python:

> 
> When reading e-mail which was sent by this example, only the "From:" and
> "Date:" headers seem to be generated. As far as I can tell, if you want
> "To:" and "Subject:" headers to appear in the e-mail then you have to
> include them in the message body. The manual suggests that you also
> include the "From:" header as well.
>
	I think you are supposed to supply all the standard headers as
part of the "body". The "from" and "to" entries on the SMTP connection
are only used for handshaking with the SMTPd. This is how BCC: is
handled -- the "sending" program extracts the addresses from TO:, CC:,
and BCC: lines in the "body", supplying those in the handshake with
SMTPd, then copies the "body" /except/ for the BCC: lines (which go to
the bit-bucket).

--
 > ============================================================== <
 >   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