How do I deal with uuencoded attachments?

Christopher Koenigsberg

First, uuencode/uudecode is not reliable (several characters vary in different implementations, and it is easy to damage, or incorrectly calculate/incompletely insert, the encoding). That's why MIME's base64 was invented.

Second, uuencoded content is simply pasted in the main message body and is not a "multipart" message (has no MIME structure) and hence does not contain "attachments" (multiple body parts), from the MIME point of view.

As far as actually doing the uuencode/decode operations... see the encode and decode methods of the MimeUtility class of the javax.mail.internet package.