I am using C# MailMessage for sending Email through office 365, and I want to change the display name of the sender in the email.
I have tried using mailMessage MailAddress Constructor like this
mailMessage.From = new MailAddress("email","display name");
but it doesn't solve the problem
But when I tried to use Gmail instead, the display name is changed.
This is our generic SMTP email function. It includes the sender's email address and name.