Hey István, The PutEmail processor is using Jakarta Mail as the underlying library. Based on some googling, I found a Stack Overflow issue [1] with similar concerns. The recommendation there is to set a system property to specify mail.mime.charset. Can you try doing that? To do so, you’d update conf/bootstrap.conf and add a new line to the bottom of the file:
java.arg.mail.charset=-Dmail.mime.charset=UTF-8 Unfortunately, that does require a restart of NiFi. Am interested to know if that helps, though. One question for you: you mentioned that the subject is incorrect, but what about the message body? Do you have UTF-8 characters in the message body that are also incorrect? Or does the message body appear to be fine? Thanks -Mark [1] https://stackoverflow.com/questions/15044027/utf-8-charset-doesnt-work-with-javax-mail On Aug 22, 2023, at 8:59 AM, Pongrácz István <[email protected]<mailto:[email protected]>> wrote: Hi, I would like to send out email with utf-8 chars in the subject, using putemail. Technically it is working fine, except the utf-8 chars in the subject changed to '?' characters. Example: I wrote the following into the subject: Hűvös van íűáéúőóüö The result is: H?v?s van ????????? The source of the receiverd email looks like this: Subject: =?ANSI_X3.4-1968?Q?H=3Fv=3Fs_van_=3F=3F=3F=3F=3F=3F=3F=3F=3F?= This seems a little bit unprofessional. Do I miss something trivial? I guess, I just missed something with the environment (locales?). I tried to find expression language possibility to do something with the subject or character encoding, but I failed. As I remember, nifi uses utf-8 and doesn't really care about character encoding conversion. I did not change too much in the environment (nothing, barebone debian 11). I use the following: Debian 11 + Nifi 1.20 root@nifi10<mailto:root@nifi10>:~# locale -a C C.UTF-8 POSIX root@nifi10<mailto:root@nifi10>:~# java -version openjdk version "11.0.16" 2022-07-19 OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb11u1) OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb11u1, mixed mode, sharing) Could you give me a hint, where to find a solution? I would like to use utf-8 chars instead of ascii. Thank you! István
