// against "text/html;" If it is more specific then leave as is,
// if it is different then use the mime type specified in the
// attachment
if( messageMimeType != null &&
bodyMimeType.indexOf( messageMimeType ) == -1 ) {
bodyPart.addHeader( "Content-Type", messageMimeType );
}
} catch( Exception e ) {
// Here we have failed to correct the mime type if required.
// Leave the bodyPart as is and continue as this is not critical
logger.warn( "attachment-mime-type-assignment-failure", e );