Merge pull request #2918 from chameleon82/issue/KEYCLOAK-3089-email-subject-internationalization
KEYCLOAK-3089 Change email subject encoding to utf-8/base64
This commit is contained in:
commit
819c42dad2
1 changed files with 2 additions and 3 deletions
|
@ -24,7 +24,6 @@ import org.keycloak.models.RealmModel;
|
|||
import org.keycloak.models.UserModel;
|
||||
import org.keycloak.services.ServicesLogger;
|
||||
|
||||
import javax.mail.Message;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Multipart;
|
||||
import javax.mail.Session;
|
||||
|
@ -108,10 +107,10 @@ public class DefaultEmailSenderProvider implements EmailSenderProvider {
|
|||
multipart.addBodyPart(htmlPart);
|
||||
}
|
||||
|
||||
Message msg = new MimeMessage(session);
|
||||
MimeMessage msg = new MimeMessage(session);
|
||||
msg.setFrom(new InternetAddress(from));
|
||||
msg.setHeader("To", address);
|
||||
msg.setSubject(subject);
|
||||
msg.setSubject(subject, "utf-8");
|
||||
msg.setContent(multipart);
|
||||
msg.saveChanges();
|
||||
msg.setSentDate(new Date());
|
||||
|
|
Loading…
Reference in a new issue