Reputation: 1
In the past few months, I used SmtpClient to send emails with host smtp.office.365.comn, and I could change the Display Name of From Email using
message.From = new MailAddress(email, displayName)
But recently the client has found out that they can no longer change that displayName, the mail they received only show email ([email protected]) in the From
So, is there any change from Microsoft or any way I can custom the Display Name? Because my code runs well with Gmail (smtp.gmail.com).
I would appreciate any help.
Thanks.
Upvotes: 0
Views: 3333
Reputation: 820
I just ran a test and sent an email from an address inside my organization, and the email message (displayed in Outlook) ignored the Display Name I had set, and instead used the display name that's set in our Active Directory for that account. I then tested with a dummy email address, and it showed the Display Name I had set. Could it be that?
Upvotes: 1