Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Problem with encoding in email subject - 6.3 or 6.4

Avatar

Level 3

Hi Everyone,

I have a problem with subject encoding. My email subject contains these chinese characters - 意向客户-参展预订-CN官网渠道 (emailSubject is the property name in the JCR to store this value) but when a User receives an email, these characters are shown like this - 意向客户-参展预订-CNå®˜ç½‘æ¸ é“

I have checked in the Publisher Logs interacting with SMTP Server and I'm getting this in the logs:

Subject: =?UTF-8?B?w6bChMKPw6XCkMKRw6XCrsKiw6bCiMK3LcOlwo/CgsOlwrHClcOp?=

=?UTF-8?B?wqLChMOowq7Coi1DTsOlwq7CmMOnwr3CkcOmwrjCoMOpwoHCkw==?=

MIME-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: quoted-printable

Template is defined as:

From: noreply@testmail.co.uk

Subject: ${emailSubject}

Author name: ${authorName}

${formData}

All other custom fields (like firstName, lastName etc) looks fine and enoding/decoding also looks Ok for these fields:

title: =E5=A4=AB=E4=BA=BA

salutation: =E5=8D=9A=E5=A3=AB=E6=95=99=E6=8E=88

firstname: =E9=9C=80=E8=A6=81=E5=A1=AB=E5=86=99=E7=A7=B0=E8=B0=93

surname: =E9=9C=80=E8=A6=81=E5=A1=AB=E5=86=99=E7=A7=B0=E8=B0=93

Seems to be encoding issue for the Subject Field.

Has anyone encountered this issue while using EmailService.sendEmail(var1, var2, var3)?

3 Replies

Avatar

Level 10

Check if this helps In Mail question mark is coming in place of special characters

Did you try to reproduce this issue with an updated version of acs commons?

Avatar

Level 3

Yes, I am using ACS Commons version 3.19.0.

Also, I tried to put the hard-coded Chinese string in the mail (abc.txt) directly and this is still not working.

Avatar

Level 4

I am also facing the same issue while using day cq mail service. Subject line with French characters are getting encoded and displayed. Can you please help

 

@arunk @arunpatidar26 @smacdonald2008