More mail retr

Ulf Engström ulf.engstrom at b2b-link.com
Thu Mar 9 09:42:12 EST 2000


I receive my mail with a small Python-app and I want to get the text/plain only from a multipartmsg, how do I do that? Do I have to use re, string or something to find the right place in the msg?
I'm currently using the rfc822-module. I get mails which contains:

This is a multi-part message in MIME format.

------=_NextPart_000_0080_01BF89D8.387387E0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

short msg

------=_NextPart_000_0080_01BF89D8.387387E0
Content-Type: text/html;
<snip>

And I want to get the 'short msg' as efficient as possible. Splitting the msg at newline of something isn't such a good idea since msgs differs a lot depending on mail client.

Also, why isn't there a getbody() function in rfc822? That would save a lot of time, or is there an other good way?

Regards
Ulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20000309/702c8515/attachment.html>


More information about the Python-list mailing list