If you’ve ever used .net to send email messages (and I hope you have!) you may have wanted to send the message from or to not only an address, but also include a name. The ‘display name’ is the name that appears in many email clients instead of the address (think ‘Chris Bitting’ instead of ‘firstname.lastname@example.org’). .Net honors the email standard of “Display Name <email@example.com>”.
Below is a quick example on how this looks in vb.net:
Dim mail As New System.Net.Mail.MailMessage("""Some Body"" <firstname.lastname@example.org>", """A Different Person"" <email@example.com>", "Subject", "Body")
Below is a full example on an email function (include Imports System.Net.Mail): Continue reading “.net SMTP – Sending An Email Message With A Display Name”