Forum Discussion

Mark_Babayev's avatar
Mark_Babayev
Copper Contributor
May 29, 2023

SMTP connector for emails with Korean charset

We have SMTP MTA server connected to the customer's Online Exchange Server which relays emails to our BE server. The customer Exchange Server has `utf8` encoding set. 

The customer receives emails in Korean correct when they are not relayed through our SMTP (as MSG files). When emails are relayed to our SMTP server we receive the relevant EML file with `euc-kr` encoding, the EML itself has diamonds and when opening it with Outlook Client it contains gibberish. All strings also become twice long.

 

Why there is a difference between Exchange Server and SMTP connection?

Can MSG and EML files have different encodings?

 

I can send an original MSG file with an EML file received by SMTP server per request to a support personnel email.

2 Replies

    • Mark_Babayev's avatar
      Mark_Babayev
      Copper Contributor

      This issue can be reproduced by this JS code:

      iconv.decode(iconv.encode(iconv.decode(iconv.encode('하나은행 보안메일', 'euc_kr'), 'utf_8'), 'utf_8'), 'euc-kr')


      After this convertion we receive duplicate characters as in the original case:

      `占싹놂옙占쏙옙占쏙옙 占쏙옙占싫몌옙占쏙옙`
      So, I think this is a Microsoft bug. It translates incorrect korean text from MSG to EML format.

Resources