try {
Multipart mp = new MimeMultipart();
MimeBodyPart htmlPart = new MimeBodyPart();
htmlPart.setContent(htmlBody, "text/html");
htmlPart.setHeader("Content-type", "text/html; charset=UTF-8");
mp.addBodyPart(htmlPart);
for (FileItem item : files) {
MimeBodyPart attachment = new MimeBodyPart();
attachment.setFileName(item.getFilename());
String mimeType = MimeType.getContentTypeByExt(
FolderUtil.getFileExt(item.getFilename()));