Free Support Forum - aspose.com

SMTP From.DisplayName not working

anyone else having this problem?
some clients are reporting as of about a week ago, the DisplayName is no longer showing what the user defined, instead, it is showing the Exchange User Name.
the SMTP server is office365.
Any ideas?

@gavinduffy,

We were unable to reproduce the issue that you reported. We used the code snippet given below for our testing.

SmtpClient smtpClient = new SmtpClient();
smtpClient.Host = "smtp.office365.com";
smtpClient.Username = "TestEmail1";
smtpClient.Password = "Password";
smtpClient.Port = 587;
smtpClient.SecurityOptions = SecurityOptions.SSLExplicit;
MailMessage mailMessage = new MailMessage("Test Name <TestEmail1>", "TestEmail2", "Test Email Subject", "Test Email Body");
smtpClient.Send(mailMessage); 

Please try the code snippet given above using the latest version of Aspose.Email for .NET API. We hope that this resolved the issue you were facing. Please feel free to reach us if the issue persists.

does not work for me.
created a test free account on outlook.com
used:
msg = New Aspose.Email.MailMessage(“Test Name <” & varoutlookemail & “>”,vartoemail, “Test Email Subject”, “Test Email Body”)
the email i receive shows the name on outlook, not Test Name

interestingly, i pull the email back down with the imap library, and i can see the test name in the from details.
but outlook on my desktop is not showing this value.
if i open the outlook email properties, i see the display name that matches the outlook.com setting, not test name.

@gavinduffy,

We have tested this issue further. The issue seems to be with outlook. Outlook seems to be ignoring the sender name in case of office365. Correct sender name is shown in the message header when viewed in outlook. Mozilla Thunderbird and Gmail show the correct sender name as well. Gmail test account credentials are given below so that you can verify the test email.

You may try configuring your test account with Mozilla Thunderbird and verify the sender name. We hope that this answered your question. Please feel free to contact us if additional information is required.