Hello Bill, Thank you for answering. I'm writing a web mail application. I want to perfectly separate each part in multipart messages, correctly display the main message in the right format (e.g. html or text according to whatever each message would display as main message in screen if it was being viewed in Outlook), decode any attached file including images that should be inserted in a html message and display links to any attachment that is supposed to be separately opened (e.g. images that are supposed to be inserted in html are not supposed to be opened as attachments and viceversa).
Basically, I want to be able to do with Perl exactly what an application like Outlook Express is able to do in order to show an eml message. The problem with Email::MIME is that for certain messages created with Outlook or Windows Live Mail (which are supposed to be 100% correct), there are some specifications or formats in each MIME part or multipart that are not being recognized by the module (p.e. "Unkown mime type" or "Ilegal character in X content type"). It doesn't happen with all messages, just certain messages. I'm trying the script with about 5,000 messages i have in my "Sent Items" folder, each one created by Microsoft applications (I've used Outlook, Outlook Express and Windows Live Mail and I imported my messages in each change). I guess there are lots of perfectly compliant formats in a multipart/mixed message that somehow are not being considered by Email::MIME but are being correctly interpreted by the Microsoft Mime Parser. That's why I wanted to know if someone here knows about some module that works better for a complete parsing of such messages without losing the original format of the message (e.g. I know I can just parse text or html in several ways, but it may end up showing something totally different to what something like Outlook would show). Cheers, Paco From: Bill Luebkert Sent: Friday, October 24, 2008 3:33 AM To: Zarabozo, Francisco (GE, Corporate) Cc: Active State Perl Mailing List Subject: Re: Email::MIME Zarabozo, Francisco (GE, Corporate) wrote: > Hello All, > > I'm using Email::MIME to interprete *.eml files (regular email messages) > in > order to display them correctly in a web page (a web mail application). > I'm > having some problems with it as it doesn't recognize certain > content-type's > in multipart messages. What do you plan on doing with these various content-types other than to just display the text as is ? > I want to be able to do this with Perl and display all kind of multipart > messages and its contents as well as Outlook Express or Windows Live Mail > do > it. I've seen Java and PHP web applications that accomplish this > perfectly, > but I really want to do it in Perl and I wouldn't like the idea of having > to > chose another language over Perl to do something Perl is supposed to do > perfectly. > > Does any one know if there's a better module to do this than Email::MIME? Depends on what you want to do with the msgs. They're just simple text msgs for the most part. MIME::Parser may be closer to what you need though. _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
