Mark Sapiro writes:
This apparently confuses the Python email package so that the get_payload() method returns a list of strings rather than a list of message objects.
Yes, I got that far too. I'm guessing that in the absence of a Content-Type, which then *should* default to text/plain, the email package goes ahead and detects the MIME headers anyway (although I don't think it should do that) and breaks the message into MIME parts. I would think we'd raise an Exception here.
If there's a reason for the email package to do that detection (*shrug*, it seems to work), then the dispatching in _handle_text should be done on the Python type rather than the MIME Content-Type.
I forget exactly how the code is structured, the relevant dispatching may be in _dispatch or in _dispatch_meth.
Steve