Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi.

I'm working with the ThinMailer script, which doesn't support email attachments. And I need to code this feature into it.

Now, I've taken a look at MIME::Tools, but still can't figure out how to get this working...

How do I feed the $body variable (that contains the email's body + all gibberish from the attachment) to this module so that it parses it and places the file in some folder?

Please help.

Thanks,
Ralph.

Replies are listed 'Best First'.
Re: Parsing Attachments
by Joost (Canon) on Jun 11, 2002 at 10:55 UTC
    Take a look at the Mail::Box bundle of modules, esp. Mail::Message - which might be more intuitive to you.
    -- Joost downtime n. The period during which a system is error-free and immune from user input.

      Just saw an item on use.perl.org about Mail::Box. The module's website is here and there's also a mailing list (subscribe address can be found in the use.perl.org story).

Re: Parsing Attachments
by Anonymous Monk on Jun 10, 2002 at 21:39 UTC
    But MIME::Lite isn't for parsing msgs...

    Please help. This MIME::Tools module is driving me insane. How can I get it to process all that gibberish in the $body variable so that it generates the correct attachment?
Re: Parsing Attachments
by kjherron (Pilgrim) on Jun 10, 2002 at 21:29 UTC
    Try using MIME::Lite. It's really simple to work with.