Multipart messages could be read by javamail api which has been shown in this example. Multipart class object is created to read the multipart mail.
For composition of mails along with attachments, Multipart mail is being used now a days. One might attach the doc, images, zip files, xls etc. Mails that could be designed nicely are created by it.
Classes are provided by the Java Mail API so that Multipart messages could be created, sent or read. Java Mail api is used