1
Answer

French character being converted into diamond with a question mark

Hi,

In .NET Core Web API Special Characters of French being converted into black diamond with question mark into Email on Server but at localhost everything is ok

Example:- Conversion of special characters

Real Word:- Converted into Mail
d’avoir = d?avoir
à = ?
procédure = proc?dure

 

---------------------------------

What I have tried:

var msg = new SendGridMessage();
string to = objContractorOperationEmail.To;
msg.AddTo(to);
msg.SetSubject(objContractorOperationEmail.Subject);
msg.AddContent(MimeType.Html, objContractorOperationEmail.Body);
Send(msg);

public void Send(SendGridMessage msg)
{
var client = new SendGridClient(_mailConfig.Value.SendgridKey);
msg.From = new EmailAddress(_mailConfig.Value.FromEmail, _mailConfig.Value.FromName);
client.SendEmailAsync(msg);
}

Answers (1)