in src/main/java/org/apache/commons/mail/MultiPartEmail.java [224:259]
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 = this.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 me)
{
throw new EmailException(me);
}
}