Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1575920] Change charset of the email mime body to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Burman committed May 29, 2018
1 parent 6264002 commit 138495d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -115,9 +115,9 @@ public Collection<String> sendEmail(Collection<String> toAddresses, String messa
}

mimeMessage.setSubject(messageSubject);
mimeMessage.setContent(messageBody, "text/plain");
mimeMessage.setContent(messageBody, "text/plain; charset=UTF-8");
} catch (MessagingException e) {
e.printStackTrace(); // TODO: Customise this generated block
LOG.error("Error while creating MimeMessage, ", e);
return toAddresses;
}

Expand Down Expand Up @@ -213,4 +213,4 @@ private String cleanse(String passedValue, String defaultValue) {
// cleanse no matter what, because it's possible the defaultValue has invalid characters too
return Matcher.quoteReplacement(results);
}
}
}

0 comments on commit 138495d

Please sign in to comment.