Is this a mimetools/rfc822 bug?
sheila at thinkspot.net
Mon Jun 25 22:45:47 CEST 2001
On Mon, 25 Jun 2001 16:37:51 -0400, barry at digicool.com (Barry A. Warsaw)
wrote about Re: Is this a mimetools/rfc822 bug?:
:>>>>> "SK" == Sheila King <sheila at spamcop.net> writes:
: SK> So far as I know, leading newline characters are not allowed
: SK> in the header. A newline character indicates the end of the
: SK> headers.
:Correct, and rfc822 is fairly strict about what it accepts. Leading
:empty lines in the text will toggle it over from "reading-headers"
:mode to "reading-body" mode. It's even worse if you have no headers,
:but your first body line has a colon in it!
But, according to the RFC's a header is required. A message body is not
According to RFCs I recall: Your message header must have at least one
of the following headers: To, Bcc, or CC. I believe that is the minimal
header: any one of the To-type fields. No other headers are required,
and no message body is required.
:Moral: massage and normalize your text before feeding it to rfc822.
More information about the Python-list