ap.setContent("some attachment text...", "text/plain");
msg.addAttachmentPart(ap);
String jpgfilename = "docs/axis.jpg";
File myfile = new File(jpgfilename);
FileDataSource fds = new FileDataSource(myfile);
DataHandler dh = new DataHandler(fds);
AttachmentPart ap2 = msg.createAttachmentPart(dh);
ap2.setContentType("image/jpg");
msg.addAttachmentPart(ap2);