Issue with cyrillic characters in razor engine

1k Views Asked by At

Please Help, I am having a problem with cyrillic characters in my email notificatons for asp.net-mvc app, which incorrectly displays in outlook. I send messages using SmtpClient, to create the messages using razor engine(I've got a few templates for different types of messages). I'm already added meta tag with charset utf-8 for my templates, also added

message.BodyEncoding = System.Text.Encoding.UTF8;
message.HeadersEncoding = System.Text.Encoding.UTF8;
message.BodyTransferEncoding = TransferEncoding.EightBit; 

for my message object(insrance of MailMessage class), but the problem remained. On web interfaces message looks fine, this issue appears only in outlook.
Thanks!

1

There are 1 best solutions below

0
On

I've had a similar problem, and the resolution was to save the code/view files in which you are setting the texts in UTF-8 encoding.