You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/07/04 12:07:38 UTC

svn commit: r1357204 - in /incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core: notification/NotificationManager.java scheduling/NotificationJob.java

Author: ilgrosso
Date: Wed Jul  4 10:07:37 2012
New Revision: 1357204

URL: http://svn.apache.org/viewvc?rev=1357204&view=rev
Log:
[SYNCOPE-104] Applied provided patch

Modified:
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java?rev=1357204&r1=1357203&r2=1357204&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java Wed Jul  4 10:07:37 2012
@@ -174,9 +174,9 @@ public class NotificationManager {
         String textBody;
         try {
             htmlBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "mailTemplates/"
-                    + notification.getTemplate() + ".html.vm", model);
+                    + notification.getTemplate() + ".html.vm", "UTF-8", model);
             textBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "mailTemplates/"
-                    + notification.getTemplate() + ".txt.vm", model);
+                    + notification.getTemplate() + ".txt.vm", "UTF-8", model);
         } catch (VelocityException e) {
             LOG.error("Could not get mail body", e);
 

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java?rev=1357204&r1=1357203&r2=1357204&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java Wed Jul  4 10:07:37 2012
@@ -136,6 +136,7 @@ public class NotificationJob implements 
                     JavaMailSenderImpl sender = new JavaMailSenderImpl();
                     sender.setHost(smtpHost);
                     sender.setPort(smtpPort);
+                    sender.setDefaultEncoding("UTF-8");
                     if (StringUtils.isNotBlank(smtpUsername)) {
                         sender.setUsername(smtpUsername);
                     }
@@ -145,7 +146,6 @@ public class NotificationJob implements 
 
                     MimeMessage message = sender.createMimeMessage();
                     MimeMessageHelper helper = new MimeMessageHelper(message, true);
-
                     helper.setTo(to);
                     helper.setFrom(task.getSender());
                     helper.setSubject(task.getSubject());