How to send email body message using character such as é, è, à

Hello,

I would like to send a email (via SMTP) using the Uipath librairie, but if the body message contains character such as ‘à, è, ò, é’ or any others character with accent, the character get replaced by ‘?’ in the email.

Is there any ways to avoid the replacement? As it’s make the message hard to read.

Thanks.

1 Like

Are you using html body or plain text? if it is plain text, maybe consider changing it to html, and when you are in html, try encoding the text before like this: System.Web.HttpUtility.HtmlEncode(varBodyText)

2 Likes

urgh, my bad, after going back into the code I realized my mistake, I’m actually using SMTP. Is that the same solution? I don’t actually have a ‘html option’ as some modules seems to have (Just looked it up in google). Any hints on how to do it?

Thanks.

yes, same…

For those that use Invoke PowerShell to send the email as me, you will need to add: -BodyAsHtml

ex: send-MailMessage -SmtpServer $smtp -To $to -From $from -Subject $subject -Body $body -BodyAsHtml

for the solution to work. :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.