How to set an text description to the 'From' object in the SMTP class?

0
Hi, I´m re-writing an application that used .NET mail class to send emails. I used to be able to be able to set a description for the sender besides the sender e-mail. See below the string "This is how I describe myself" Mail.From = New MailAddress("myemail@me.com","This is how I describe myself") So in the email header in the from field I would then see 'myemail@me.com - This is how I describe myself' So this is a snippet in VB.Net using componentpro mail API: ' Create a new instance of the Smtp class. Dim SMTPClient As New Smtp ' Connect to the server. SMTPClient.Connect(My.Settings.EmailServerAddress, My.Settings.EmailServerPort) ' Login to the server using NTLM authentication method. SMTPClient.Authenticate(My.Settings.EmailSenderAccount, My.Settings.EmailSenderAccountPassword, SmtpAuthenticationMethod.Auto) ' Create a new mail message. Dim msg As New MailMessage() msg.Subject = strSubject ' msg.BodyText = strMessage msg.From = "myemail@me.com" Notice in the from member, (msg.from) I can define an email, but how can I define the sender description using componentpro mail API? Tks Daniel
 
asked 3/30/2018 2:48:43 AM
add a comment

2 Answers

1
To add a full name to the sender or recipient, you can use the following format "`First Last`". Please let us know if it's what you are looking for.
edited 3/30/2018 4:14:39 AM
answered 3/30/2018 4:14:15 AM
add a comment
0
Not sure if I missed this but I don´t think that´s clear in the documentation of the 'From' member... Thanks for the solution!
 
answered 3/30/2018 10:46:57 PM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged mail-expert smtp or ask your own question.