in reply to Re: Re: saving pdf attachments
in thread saving pdf attachments

OK so the problem is that your MimeReader.pm can not cope with what the MIME it is getting.

You probably are not parsing the corrupt MIME that some mail clients send 'correctly'! I have a webmail app with its own MIME parser built in. It has proven pretty reliable in practice at extracting attachemnts. Drop me a line and I will send you the code. Email jfreeman@tassie.net.au

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: Re: saving pdf attachments
by busch4al (Novice) on Feb 28, 2003 at 19:20 UTC
    Hi Tachyon, I figured out the problem. For pdf files at least, the quoted-printable format was missing an "=" at the end of one or two lines. So, when I ran it through the MIME::QuotedPrint::decode_qp, the extra control-M (\r) was getting stripped. I'm not sure why it works, but I'm doing a s/\n$/\r\n/ on lines that don't end with =.

    Thanks for all the help to everyone!

    busch4al

      You should be unwrapping it accoring to the spec (soft line breaks). Then modifying this to allow for the corrupt examples. But I guess you are now.....

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print