in commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/MultiPartEmail.java [304:330]
public void buildMimeMessage() throws EmailException {
try {
if (primaryBodyPart != null) {
// before a multipart message can be sent, we must make sure that
// the content for the main body part was actually set. If not,
// an IOException will be thrown during super.send().
final BodyPart body = getPrimaryBodyPart();
try {
body.getContent();
} catch (final IOException e) { // NOPMD
// do nothing here.
// content will be set to an empty string as a result.
// (Should this really be rethrown as an email exception?)
// throw new EmailException(e);
}
}
if (subType != null) {
getContainer().setSubType(subType);
}
super.buildMimeMessage();
} catch (final MessagingException e) {
throw new EmailException(e);
}
}