Skip to content
Snippets Groups Projects
Commit 3d342999 authored by buczekp's avatar buczekp
Browse files

[SE-174] using unicode for emails

SVN: 14741
parent 98b65325
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,8 @@ public final class MailClient extends Authenticator implements IMailClient ...@@ -60,6 +60,8 @@ public final class MailClient extends Authenticator implements IMailClient
/** This system property is not supported by the <i>JavaMail API</i> */ /** This system property is not supported by the <i>JavaMail API</i> */
public final static String MAIL_SMTP_PASSWORD = "mail.smtp.password"; public final static String MAIL_SMTP_PASSWORD = "mail.smtp.password";
private static final String UNICODE_CHARSET = "utf-8";
private static final Logger operationLog = private static final Logger operationLog =
LogFactory.getLogger(LogCategory.OPERATION, MailClient.class); LogFactory.getLogger(LogCategory.OPERATION, MailClient.class);
...@@ -183,8 +185,15 @@ public final class MailClient extends Authenticator implements IMailClient ...@@ -183,8 +185,15 @@ public final class MailClient extends Authenticator implements IMailClient
msg.setReplyTo(replyToAddress); msg.setReplyTo(replyToAddress);
} }
msg.addRecipients(Message.RecipientType.TO, internetAddresses); msg.addRecipients(Message.RecipientType.TO, internetAddresses);
msg.setSubject(subject); if (true)
msg.setText(content); {
msg.setSubject(subject);
msg.setText(content);
} else
{
msg.setSubject(subject, UNICODE_CHARSET);
msg.setText(content, UNICODE_CHARSET);
}
send(msg); send(msg);
} catch (MessagingException ex) } catch (MessagingException ex)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment