The solution seems to be in the mime type settings for the FileDataSource. I have added a MimetypesFileMap into the code and added "application/zip zip" as a MimeType. Then associated that FileTypeMap with the datasource, but the result is still the same.
The code is :
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Create Multipart
Multipart multipart = new MimeMultipart();
// Add part one
multipart.addBodyPart(mbp1);
// Create second body part
MimeBodyPart mbp2;
// Third part is list of attached files in error
MimeBodyPart mbp3;
FileDataSource fds;
/* If zipped requested, send all checked files to be zipped
* otherwise attach all the checked files */
if (zip.equals("1")) {
MimetypesFileTypeMap mftm = new MimetypesFileTypeMap();
mftm.addMimeTypes("application/zip zip");
//mftm.addMimeTypes("application/x-zip-compressed zip");
File zipped = new File(RicohZip.ZipUpFiles(checkedFiles));
// Create second body part
mbp2 = new MimeBodyPart();
// Add the zipped file to the FileDataSource
fds = new FileDataSource(zipped);
// set the mime types
fds.setFileTypeMap(mftm);
// Set the data handler to the attachment
mbp2.setDataHandler(new DataHandler(fds));
// Set the filename
mbp2.setFileName(fds.getName());
mbp2.setText("\n");
// Add part to multipart
multipart.addBodyPart(mbp2);
}
// Put parts in message
message.setContent(multipart);
// Send the message
Transport.send(message);