Send Outlook Mail activity language issue

My client is a Japanese company. And I want to send an email in Japanese by using Send Outlook Mail activity. When I run it in debug mode and use a breakpoint, it seems like Japanese language comes out when I typed that variable in Immediate prompt. But after Send Outlook Email activity, it does send it in Japanese. Do you know the issue?

Hi @kdlee ,
The issue is usually caused by character encoding mismatch. Verify UTF-8 encoding of the source data and ensure the email body is passed to Outlook without any conversion or special character replacement.

Thanks

Hi @kdlee

Yes. If Japanese text looks correct in the Immediate window, then the variable itself is probably fine. I’d check the mail activity and Outlook side rather than the variable.

  • Make sure the variable is a String, not being converted to another type.

  • Check whether the Japanese text is being passed directly to the Body property.

  • If you are using HTML body, make sure the HTML specifies UTF-8 encoding, for example <meta charset="UTF-8">.

  • Try sending a simple hardcoded Japanese string through the same activity. If that also becomes corrupted, the issue is most likely related to the mail/Outlook encoding rather than UiPath.

Hi @kdlee,

Since you are using Send Outlook Mail Message (COM-based) activity, encoding issues are rare since Outlook handles it, check the source string’s encoding properly.

Also confirm “IsBodyHtml = True” if sending HTML, so charset is declared properly.

Cheers!

Hi @kdlee,

One more thing you can check is whether the issue happens only with HTML mail.

Try sending the same Japanese text once as plain text and once with IsBodyHtml = True. If plain text works but HTML does not, then the problem is most likely in the HTML/body formatting rather than the variable itself.

Also, since the value looks correct in the Immediate panel, I would check Outlook’s preferred encoding for outgoing messages and make sure it is set to Unicode/UTF-8.

If possible, please share how the Japanese characters appear in the received email (???, boxes, garbled text, etc.). That can help identify where the conversion is happening.

@kdlee

I think it will send the email without any error, just i tried to replicate that but is able to send email in Japanese.

If you find any error, please share that error message.

I found the problem. There was a variable in “Forward” part in “Source email”, after erasing that variable, it started working :sweat_smile: