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

Hello Monks,

I have written a new piece of code that logs into a mailbox, goes through each message and downloads the attachment.

I have used the function $parser->filer->output_prefix($msgID) to prefix the message files with the Message ID in the headers. But this doesn't prefix the attachment names with the Message ID.

Here's my question:
How do I ensure that the attachment files (e.g. Accounts.xlx) for a particular message are prefixed with the Message ID (e.g. 7915ecf0-2784-49c4-a579-e550b402ad7d-Accounts.xls)?

I'd appreciate your comments on this.
Thanks.

Replies are listed 'Best First'.
Re: Extracting Attachments using MIME::Parser - Custom Filenames
by Corion (Patriarch) on Aug 25, 2015 at 09:33 UTC

    The documentation for MIME::Parser::Filer cautions that subclasses might not honor the prefix, but the code seems to honor it. Can you show some self-contained code that demonstrates the problem?