TheHobbit has asked for the wisdom of the Perl Monks concerning the following question:
I'm developping a little application, one component of wich needs to download some mail messages from a POP3 account and do something with them according to data such as the From: address, the Subject header and (obviously) the contents.
I got this idea to use Mail::POP3Client for doing the download, and it works fine. But now I do not want to reinvent the wheel just another time, so I though to use the Mail::Message class to do the parsing for me.
Well, I'm unable to find a clean way to transform the string obtained by the HeadAndbody method of the Mail::POP3Client into a Mail::Message object (actually a subclass of it I defined).
So here comes the question. Am I too a blockhead to find how to do that, or realy this operation is so difficult?
Subsidiary question is: is there another way to parse a string conatining a mail message into some kind of structure allowing easy access to the different parts of the message?
Thank you and may your regex only match when they have to.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Reading Mail::Message objects using Mail::POP3Client
by dws (Chancellor) on Oct 13, 2002 at 17:34 UTC | |
Re: Reading Mail::Message objects using Mail::POP3Client
by jlongino (Parson) on Oct 13, 2002 at 18:59 UTC | |
Re: Reading Mail::Message objects using Mail::POP3Client
by true (Pilgrim) on Oct 14, 2002 at 01:59 UTC |