aboutsummaryrefslogtreecommitdiff
path: root/juick-api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-05 12:26:35 +0300
committerGravatar Vitaly Takmazov2018-01-05 12:26:35 +0300
commitd71a09ef1da867ac5571a7e6d032a704f3a73ee0 (patch)
tree62c4e5ecec84bb231a70afcd2d31daff7bd17a05 /juick-api
parent4cfc36439285a36811d525341cde3785f539efdd (diff)
email: utf-8 mime parts
Diffstat (limited to 'juick-api')
-rw-r--r--juick-api/src/main/java/com/juick/api/EmailManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-api/src/main/java/com/juick/api/EmailManager.java b/juick-api/src/main/java/com/juick/api/EmailManager.java
index 2f4065d0..d906b8a5 100644
--- a/juick-api/src/main/java/com/juick/api/EmailManager.java
+++ b/juick-api/src/main/java/com/juick/api/EmailManager.java
@@ -81,14 +81,14 @@ public class EmailManager implements ApplicationListener<MessageEvent> {
", discussion or tag. Reply to this email directly or view it on Juick: %s.",
StringUtils.isNotEmpty(msg.getText()) ? formatPost(msg) : "", formatUrl(msg));
MimeBodyPart textBodyPart = new MimeBodyPart();
- textBodyPart.setContent(plainText, "text/plain");
+ textBodyPart.setContent(plainText, "text/plain; charset=UTF-8");
String htmlText = String.format("%s<br /><br />--<br />You are receiving this because you are subscribed to this user " +
", discussion or tag. Reply to this email directly or <a href=\"%s\">view it</a> on Juick." +
"<br /><a href=\"https://juick.com/settings?hash=%s\">Configure or disable notifications</a>",
StringUtils.isNotEmpty(msg.getText()) ? formatPost(msg) : "", formatUrl(msg),
userService.getHashByUID(userService.getUserByEmail(email).getUid()));
MimeBodyPart htmlBodyPart = new MimeBodyPart();
- htmlBodyPart.setContent(htmlText, "text/html");
+ htmlBodyPart.setContent(htmlText, "text/html; charset=UTF-8");
Multipart multipart = new MimeMultipart("alternative");
multipart.addBodyPart(textBodyPart);
multipart.addBodyPart(htmlBodyPart);