Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: MIME::Tools to save attachment properly

by Corion (Patriarch)
on Jan 24, 2017 at 12:32 UTC ( [id://1180210]=note: print w/replies, xml ) Need Help??


in reply to Re^3: MIME::Tools to save attachment properly
in thread MIME::Tools to save attachment properly

I would look at the data you accumulate here:

my $entity = $parser->parse_data(join '', @{$server->get($i)});

And write that to a file and try to find out whether the attachment payload is malformed or whether there are two attachments with the same suggested output filename etc.

If you suspect that the output file is overwritten, consider running your program under truss or strace to find the API calls that are made. Also consider looking at MIME::Parser::Filer to avoid using (or at least output) the filenames that come in the mail and give your own filenames if you suspect overwriting going on.

Maybe you can also remove most of the base64 encoded payload (if it has been proven to be valid) and replace it by something much smaller that you can post here so we can try to reproduce your problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180210]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found