Bill Janssen writes: > I should point out that I also store lots of metadata in the registered > MIME format text/rfc822-headers (defined in RFC 1892), data that doesn't > necessarily conform to the specific set of headers mentioned in RFC822. > It would be nice if the header support in the email package would also > support reading and writing that format.
I'm not sure what you're saying here. RFC 822 is inclusive. More or less, if it looks like a header, it is a header, and we need to parse it at least into field name and field body, whether RFC 822 defines more specific syntax for it or not. Is that all, or do you mean you want it to give that MIME format special treatment, such as a method for converting a Message object containing a parsed RFC 822 message to a Message object containing a multipart/report message and a text/rfc822-headers subobject, ready to have the text/plain and message/delivery-status parts filled in per RFC 1892? > And MIME multipart is sometimes used in applications other than email. > It would be nice if the MIME parsing part of the email module could be > used for those purposes, as well -- basically without some of the > headers defined in 2822 and 2821. Ditto, here. I would expect that you could feed an HTTP stream containing headers and content to the Message constructor and get something sensible back. Dunno what Barry thinks of that, though. _______________________________________________ Email-SIG mailing list [email protected] Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com
