Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Corrupted ZIP file using MIME::Liteby rlambert7 (Acolyte) |
on Dec 30, 2007 at 17:21 UTC ( [id://659645]=perlquestion: print w/replies, xml ) | Need Help?? |
rlambert7 has asked for the wisdom of the Perl Monks concerning the following question:
I'm am sending an email with an attached ZIP file to my AOL email address using MIME::Lite. I do receive the email with the ZIP file attached, but the ZIP file is corrupted. :( Now, what probably comes first to mind is that the ZIP file must have been created in a corrupted state, or that AOL is corrupting it. Well, I've checked that. My application also FTP's the ZIP file to an FTP site. If I manually connect to the FTP site, download the ZIP to my PC, I can open it, and extract the contents, and all of it is just as I would expect. If I email the ZIP file from my PC at work to my AOL account using MS Outlook, I can logon to AOL, open the email, download the attached ZIP file, and open it. If I email, using my MIME::Lite code, the ZIP file to my work email address, Outlook says the ZIP file is corrupted. So, that seems to me to leave MIME::Lite as the problem. The following is not my exact code, I won't have access to it for a while, but it's pretty close, as I pretty much cut-and-pasted this code from the example at CPAN, changing just the file names, email addresses, etc to my situation. BTW, you'll notice a "Debug=>1" in the code below. That causes a BUNCH of stuff to be spit out, and I don't see anything in that which would indicate a problem. Final comment, for now. The "debug output" indicates that Content-Type-Encoding is 'base64'. I read somewhere else that MIME::Lite "knows" to set that based on the the "Type => 'application/zip' specification in the code. Thanks for any insight you can provide on this Here's the code:
Back to
Seekers of Perl Wisdom
|
|