in reply to Re^4: mail attachment extraction
in thread mail attachment extraction

I'm not sure what exactly it is what you're stumbling over.

I have tested the code I've submitted and it works quite well.

Just instantiate Email::MIME::Attachment::Stripper using the full text mail, as I mentioned previously and it just works as expected. Did you try it ?

Outcomment all code you have in your original program between the assignment to $MsgTxt and the instantiation of the stripper.

I'll add the full code if you think it's necessary, but there is really nothing else there than getting rid of the superfluous codelines.

Replies are listed 'Best First'.
Re^6: mail attachment extraction
by phocean (Novice) on May 06, 2007 at 17:22 UTC
    Really ! So something must be wrong with me... Using Attachment::Stripper directly fails on : "Need a message"... I updated the code on this page, as you can see I followed your recommandation. Of course, I tried "$stripper = Email::MIME::Attachment::Stripper->new($MsgTxt);" many times.
      Well... Here is the code that works for me, I've just changed the auth data for me to work and have now commented out everything I think is irrelevant:

      As said, this works for me. Might be that we have different version of Email::MIME::Attachment::Stripper; what I have is version 1.313, Perl 5.8.8.
        Thank you for giving this code, but there is something definitely weired... I pasted your code as it is and it always complain with "Need a message..." I use the same version of perl and Attachment::stripper as you...