How can I decode a Mail with JavaMail, having an UU-encoded attachment (in a begin .. end section), when part.getContentType() returns "text/plain"? I.e. there are no MIME-Types specified.

Dieter Wimberger

You can try to process the plain text message by matching the start and end tokens within it. A pattern matching toolkit (see, and a few code as glue will manage to extract the embedded attachment into a buffer.
Once that is achieved, you can decode it (see public static decode( is, java.lang.String encoding)throws MessagingException, supports "uuencode") and display it or save it to a file or whatever.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact