import javax.mail.internet.MimeBodyPart;\r
import javax.mail.internet.MimeMessage;\r
import javax.mail.internet.MimeMultipart;\r
+import javax.mail.internet.MimeUtility;\r
\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
}\r
\r
message.setSentDate(new Date());\r
- message.setSubject(mailing.subject);\r
+ // UTF-8 encode\r
+ message.setSubject(MimeUtility.encodeText(mailing.subject, "utf-8", "B"));\r
\r
MimeBodyPart messagePart = new MimeBodyPart();\r
messagePart.setText(mailing.content, "utf-8");\r