Expand my Community achievements bar.

In Mail question mark is coming in place of special characters

Avatar

Level 4

Hi All,

I have a simple abc.txt email template under /etc/notification/email .

**************************abc.txt****************************

<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<pre style="white-space:normal;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
         <br/><br/>
          ${pages} 
    </table>
</pre>
</body>
</html>

Whenever off time property will be changed the mail will be triggered. For this code is written as below.

In onevent we are calling below

emailService.sendEmail(EMAIL_TEMPLATE_PATH,emailParamsThirty,groupEmail);

******************************EMAIL CODE*********************************

private Map<String, String> prepareEmailParams(ResourceResolver resourceResolver, String pagePath)  {                
                final Map<String, String> emailParams = new HashMap<String,String>();        
                String pagePath = resourceResolver.map(page.getPath()); 
                strBufferPages.append("<li><a href='").append(pagePath).append(".html").append("'>");
                strBufferPages.append("第65回日");  --------THIS ONE WHEN WE WILL GET IN MAIL IT IS COMING LIKE ?65??

                strBufferPages.append("</a></li>");
                strBufferPages.append("</ul> </td></tr>");                
                //LOGGER.info("pagesExists ========== +++++++++++++ ==== " + strBufferPages.toString());
                emailParams.put("pages", strBufferPages.toString());                
    }

But When I am getting mail , the UTF-8 is removed and it is coming like ?65??

Can anybody please help me on this.

Thanks in advance.

11 Replies