in reply to decoding (image/jpg) attachments

I don't know what to say about the MIME problem, except that showing us the code in question may help in debugging it.

Convert::UU can uudecode a string or file.

-Mark