in reply to Convert Multipart Email to plain text

This looks similar to a column I wrote 3 years ago for SysAdmin magazine. Check there for additional information.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Convert Multipart Email to plain text

Replies are listed 'Best First'.
Re: Re: Convert Multipart Email to plain text
by Koosemose (Pilgrim) on Mar 19, 2004 at 18:03 UTC

    I made use of the two MIME:: modules mentioned in the column, and they worked well... most of the time. For certain messages, it would cause my proxy to never pass the message along to my mail client. So until I can track down the problem, I am back to doing it with my handrolled solution. But nonetheless, your article gave me a good headstart on the usage of those two modules, and the rest of the MIME:: family, thanks. (That and it's nice to not be the only one to have made cheesey MIME puns)

    Just Another Perl Alchemist
      Assuming you've followed along and managed to get a valid $entity (isa MIME::Entity), the following example from the manpage of the same name is pretty nifty:

      # Only keep text parts my @keep = grep { $_->effective_type =~ m|^text/| } $entity->parts; $entity->parts(\@keep);
      Peace,
      -McD