// Fill the message
messageBodyPart.setText(text);
// Create a Multipart
Multipart multipart = new MimeMultipart();
// Add part one
multipart.addBodyPart(messageBodyPart);
while (itAttNames.hasNext()) {
String oneAttachmentName = (String)itAttNames.next();
// Create another body part
messageBodyPart = new MimeBodyPart();
// Set the data handler to the attachment