Problem with smtplib: message vanishes

Matthew Dixon Cowles matt at mondoinfo.com
Fri Apr 20 19:30:11 EDT 2001


On Sat, 21 Apr 2001 01:15:44 +0200, Gregor Lingl <glingl at aon.at>
wrote:

>I've got the following problem:
>
>Using smtplib as discribed in the documentation and also in Lutz'
>Programming Python to send emails, I'm able to send mails without
>error messages.

[. . .]

>... which means: the message-text is missing completely.

>When looking at the 'source-code' of the message, I find:

>Message-ID: <md5:109854F5E892C61A892F988123CB0A00>
>Return-Path: <lingl at aon.at>
[. . .] 
>Subject: python-mehl2
>Vielleicht geht's so!
>probieren wirs's aus
>Grüße
>Gregor
>X-Mozilla-Status: 0000
>X-Mozilla-Status2: 00000000
>X-UIDL: 987804705.4637304.SSP1NO49,S=520

Gregor,
You need a blank line after your headers. It looks like your script
creates at least some of the headers in the message (the subject line
for example). RFC822 specifies a blank line between the end of a
message's headers and the beginning of the body. Since it seems that
your script doesn't add the blank line, Netscape adds its own headers
at the bottom.

Regards,
Matt



More information about the Python-list mailing list