SMTP How to get "Common Name <senderaddress@mail.com>"

Hi there,

I’m sending mails with the following settings and it works fine.

 mailServer = New SMTPSecureSocket
 mailServer.Address = "smtp.mail.com"
 mailServer.Port = 465
 mailServer.ConnectionType = SMTPSecureSocket.SSLv23
 mailServer.Secure = True

But with the following the recipient of the mail sees only the sender mail address like “senderaddress@mail.com

 mailServer.Username = "senderaddress@mail.com"
 mailServer.Password = "****"

I’d like the recipient to see sender “Common Name” using something like “Common Name” senderaddress@mail.com"
I tried with single quotes:

mailServer.Username = "'Common Name' <senderaddress@mail.com>"

and without single quotes:

mailServer.Username = "Common Name <senderaddress@mail.com>"

But neither solution works, the mail is not sent…

Any suggestions ?

Thanks !

That’s easy - I’m using:

 mail.fromAddress= "Common Name<senderaddress@mail.com>"

Really easy ! Thanks for the answer !