[keycloak-user] Email internationalization

Stian Thorgersen sthorger at redhat.com
Tue Jun 7 07:48:30 EDT 2016


If you change the PR to use MimeMessage#setSubject(subject, charset) we
should just add it. It's better to have it just work rather than require
changing default system encoding or using -Dfile.encoding.

On 7 June 2016 at 08:18, Nekrasov Aleksandr <a.nekrasov at ftc.ru> wrote:

> I`m configured new allocated standalone keycloak server with your note and
> it was very helpful in all my cases.
>
>
>
> Should we add a note to the documentation about this issue?
>
>
>
> I`m already create issue  https://issues.jboss.org/browse/KEYCLOAK-3089
> and PR https://github.com/keycloak/keycloak/pull/2918 for it. Do you need
> to reject it?
>
>
>
> *From:* Tair Sabirgaliev [mailto:tair.sabirgaliev at gmail.com]
> *Sent:* Tuesday, June 07, 2016 11:52 AM
> *To:* keycloak-user at lists.jboss.org; Некрасов Александр Сергеевич; Stian
> Thorgersen
> *Subject:* RE: [keycloak-user] Email internationalization
>
>
>
> Did you try specifying default encoding for Java?
>
>
>
> in bin/standalone.conf: JAVA_OPTS=“….. -Dfile.encoding=UTF-8"
>
>
>
> --
> Tair Sabirgaliev
>
>
>
> On 7 June 2016 at 11:48:03, Nekrasov Aleksandr (a.nekrasov at ftc.ru) wrote:
>
> Hello.
>
> I have installed Wildfly10 on SunOS 5.10.
>
>
>
> I am using Microsoft Outlook as a client and it shows header Subject as
>
>
>
> Subject:
> =?ISO646-US?B?Pz8/Pz8/Pz8/Pz8/PyA/Pz8/Pz8gPz8/Pz8/Pz8/Pz8gPz8/Pz8=?=
>
>
>
> System encoding for some reasons is ISO646-US, which is diffefent with
> encoding, what I needed.
>
>
>
> *From:* Tair Sabirgaliev [mailto:tair.sabirgaliev at gmail.com]
> *Sent:* Tuesday, June 07, 2016 11:25 AM
> *To:* keycloak-user at lists.jboss.org; Некрасов Александр Сергеевич; Stian
> Thorgersen
> *Subject:* Re: [keycloak-user] Email internationalization
>
>
>
> 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/cbffa924/attachment.html 


More information about the keycloak-user mailing list