} else {
Multipart multipart = new MimeMultipart();
// Add the text message first
MimeBodyPart msgBody = new MimeBodyPart();
msgBody.setContent(content, MailConfiguration.getMailMimeType());
multipart.addBodyPart(msgBody);
// Attach all the requested files
for (int i=0; i<attachments.size(); i++) {
MailAttachment mailAttachment = (MailAttachment) attachments.get(i);
MimeBodyPart msgAttachment = new MimeBodyPart();
msgAttachment.setDataHandler(mailAttachment.getDataHandler());