Merge remote-tracking branch 'upstream/develop' into writePerformance

This commit is contained in:
brianjlowe 2016-02-11 17:49:23 +02:00
commit 97658ad25f
8 changed files with 24 additions and 10 deletions

View file

@ -171,7 +171,7 @@ public class MailUsersServlet extends VitroHttpServlet {
msg.setSubject( deliveryfrom );
// add the multipart to the message
msg.setContent(msgText,"text/html");
msg.setContent(msgText,"text/html; charset=UTF-8");
// set the Date: header
msg.setSentDate( new Date() );

View file

@ -276,7 +276,7 @@ public class ContactMailController extends FreemarkerHttpServlet {
msg.setSubject( deliveryfrom );
// add the multipart to the message
msg.setContent(msgText,"text/html");
msg.setContent(msgText,"text/html; charset=UTF-8");
// set the Date: header
msg.setSentDate( new Date() );

View file

@ -172,15 +172,15 @@ public class FreemarkerEmailMessage {
if (htmlContent.isEmpty()) {
log.error("Message has neither text body nor HTML body");
} else {
msg.setContent(htmlContent, "text/html");
msg.setContent(htmlContent, "text/html; charset=UTF-8");
}
} else {
if (htmlContent.isEmpty()) {
msg.setContent(textContent, "text/plain");
msg.setContent(textContent, "text/plain; charset=UTF-8");
} else {
MimeMultipart content = new MimeMultipart("alternative");
addBodyPart(content, textContent, "text/plain");
addBodyPart(content, htmlContent, "text/html");
addBodyPart(content, textContent, "text/plain; charset=UTF-8");
addBodyPart(content, htmlContent, "text/html; charset=UTF-8");
msg.setContent(content);
}
}

View file

@ -56,7 +56,7 @@ public class MailUtil {
msg.setSubject( subject );
// add the multipart to the message
msg.setContent(messageText,"text/html");
msg.setContent(messageText,"text/html; charset=UTF-8");
// set the Date: header
msg.setSentDate( new Date() );