Re: OT - Tool for getting text body of email
On Sun, Dec 23, 2001 at 10:49:46AM -0900, Christopher S. Swingley wrote:
> I need to write a program the extracts the ASCII text portion
> of email messages for insertion into a database. I looked at the
> libmailtools-perl package, but it doesn't look like it can deal with
> the annoying variety of mail that I may need to parse (The silly +'s
> at the end of lines, MIME-attached HTML, vcards, etc.).
> What I want is a filter that I pass an email in, and out pops the
> ASCII, 72-line width formatted message. All attachments, HTML mail,
> vcards and strangeness is removed.
> Does such a thing exist?
Either of these two programs might do what you want.
I use the first to filter all messages through my mailman lists.
Stripmime can be found at http://www.phred.org/~alex/stripmime.html.
Demime can be found at http://scifi.squawk.com/demime.html.
Every citizen who has produced or acquired a product should have
the option of applying it immediately to his own use or of
transferring it to whoever on the face of the earth agrees to
give him in exchange the object of his desires. To deprive him of
this option . . . solely to satisfy the convenience of another
citizen, is to legitimize an act of plunder and to violate the
law of justice.
-- Frédéric Bastiat (1801-1850)
Rick Pasotto email@example.com http://www.niof.net