I'm at the "receiving end" of the mail wire: i receice mails in my (MS Windows Exchange) inbox encoded in standard mail/MIME format.
I'm interested in the text part of the body of these mails, that is: "what follows the mail header" (ie. the
From:, Sent: To: Issue: stuff). The body contains haiku entries, that i parse and reshuffle into a voting list, and subsequently rank according to received votes, -- but the app as such is not that interesting in this context.
An example of the text part of a mail message is:
[author] xxx yyy
[1]
clouds . . .
the distance blossoming
between two crows
[2]
a morning
without incident
dead fly
[3]
sunrise ceremony
the holy man's third eye
bloodshot
[4]
morning dew
bell bottoms darkened
by mayflies
This is what i'm interested in parsing out, and this is the text part of the message, that is displayed in the mail client (in casu: MS Outlook).
The problem is, that the above text is
not what i get from the mail body handed over by the the mentioned MIME modules. Instead i get the full mail body segment, including binary MIME encodings and HTML tagging.
So i have to do some filtering to get at the text "payload", that i need for the app. Now i was wondering, if anybody had already wrapped this functionality into a function, possibly in a MIME module. That was my question
I haven't worked with email before, so maybe i'm simply overlooking som basic assumptions about the MIME format & parsing...
-- allan