Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/integration/mail/Mail.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ public static void sendMessage(String smtpHost, String to, String from, String r
}
mail.setSubject(subject);

if (!CONTENT_TYPE_PLAIN_TEXT.equals(contentType) && !CONTENT_TYPE_HTML.equals(contentType)) {
throw new MessagingException("The 'ContentType' field should be '" + CONTENT_TYPE_PLAIN_TEXT + "' or '"
if (!contentType.startsWith(CONTENT_TYPE_PLAIN_TEXT) && !contentType.startsWith(CONTENT_TYPE_HTML)) {
throw new MessagingException("The 'ContentType' field should start with '" + CONTENT_TYPE_PLAIN_TEXT + "' or '"
+ CONTENT_TYPE_HTML + "'.");
}
mail.setContentType(contentType);
Expand Down