Here's a code snippet you might find useful. I'm using the "Mail::MboxParser::Mail" module with great results.
You need to create the object using the head and body from "Mail::POP3client" before you can call "store_all_attachments". I hope this helps.



use Mail::POP3Client; use Mail::MboxParser::Mail;

my $pop = new Mail::POP3Client (...);

    for my $i (1 .. $pop->Count) {
        my $msg = Mail::MboxParser::Mail->new( [ $pop->Head($i) ],
                                               [ $pop->Body($i) ] );
        $msg->store_all_attachments( path => '/home/user/dump' );
    }


Gregg R. Allen






On Wednesday, March 26, 2003, at 07:09 AM, [EMAIL PROTECTED] wrote:


------------------------------------------------
On Wed, 26 Mar 2003 16:39:16 +0530, "Akshay Kumar" <[EMAIL PROTECTED]> wrote:


Hi All,

Daily a mail with some attachment is sent to an email account. I have got full access of the email account with pop reading facility. Now, I need to download the attachment of any particular email based on the date.

Waiting for TIPS for a script in PERL.


Please don't cross post to multiple lists. If you post to one and don't get the answers you seek then post to the other...


You should check out one of the many mail handling modules, for instance:

Mail::Box
Mail::POP3Client

I have had success with the first (though not specifically with POP) and heard of people who have had success with the other.

http://danconia.org

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to