[keycloak-user] keycloak-user Digest, Vol 30, Issue 24

Tair Sabirgaliev tair.sabirgaliev at bee.kz
Tue Jun 7 01:27:53 EDT 2016


Hi Aleksandr!

What is your Wildfly version?

Wildfly 8 has buggy Java Mail API. In Wildfly 9 and later proper encoding
is done automatically, no need to `encodeText` manually.

See my answer here:
http://stackoverflow.com/questions/35010796/wildfly-9-x-fails-encoding-greek-attachment-filenames

-- 
Tair Sabirgaliev


On 7 June 2016 at 11:03:50, keycloak-user-request at lists.jboss.org (
keycloak-user-request at lists.jboss.org) wrote:

Message: 1
Date: Mon, 6 Jun 2016 12:12:26 +0000
From: Nekrasov Aleksandr <a.nekrasov at ftc.ru>
Subject: [keycloak-user] Email internationalization
To: "keycloak-user at lists.jboss.org" <keycloak-user at lists.jboss.org>
Message-ID: <59219ba4c1b449d0a2bded5436b8ca6a at nut-mbx-4.win.ftc.ru>
Content-Type: text/plain; charset="koi8-r"

Hello everyone.
I found a bug when trying to send email from keycloak to users with
encoding against English.
For example, when I try to send Russian message with subject "???????? ????
??????? ??????" I see "????????????? ?????? ??????????? ?????" in my email.

I think you should update org.keycloak.email.DefaultEmailSenderProvider
class with line
msg.setSubject(subject);
to
msg.setSubject(MimeUtility.encodeText(subject, "utf-8", "B"));

Thanks.

Nekrasov Aleksander,
Developer,
Center of Financial Techologies
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.jboss.org/pipermail/keycloak-user/attachments/20160606/bea2f782/attachment-0001.html

------------------------------

Message: 2
Date: Mon, 6 Jun 2016 19:38:59 +0200
From: Stian Thorgersen <sthorger at redhat.com>
Subject: Re: [keycloak-user] Email internationalization
To: Nekrasov Aleksandr <a.nekrasov at ftc.ru>
Cc: "keycloak-user at lists.jboss.org" <keycloak-user at lists.jboss.org>
Message-ID:
<CAJgngAeDFzb96dtFGgz59_RE-A3oGAJUNsNFPA-xXjxvYWipGw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Please create a JIRA. If you want to submit a PR that would be welcome as
well.

On 6 June 2016 at 14:12, Nekrasov Aleksandr <a.nekrasov at ftc.ru> wrote:

> Hello everyone.
>
> I found a bug when trying to send email from keycloak to users with
> encoding against English.
>
> For example, when I try to send Russian message with subject ?????????
> ???? ??????? ??????? I see ?????????????? ?????? ??????????? ?????? in my
> email.
>
>
>
> I think you should update org.keycloak.email.DefaultEmailSenderProvider
> class with line
>
> msg.setSubject(subject);
>
> to
>
> msg.setSubject(MimeUtility.*encodeText*(subject, *"utf-8"*, *"B"*));
>
>
>
> Thanks.
>
>
>
> Nekrasov Aleksander,
>
> Developer,
>
> Center of Financial Techologies
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.jboss.org/pipermail/keycloak-user/attachments/20160606/21c2041b/attachment-0001.html

------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160607/4823664c/attachment.html 


More information about the keycloak-user mailing list