Subject: How to set an text description to the 'From' object in the SMTP class?
Date: 2018-03-30 02:48:43
From: Daniel
Source: set-text-description-from-object-smtp-class


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("","This is how I describe myself")

So in the email header in the from field I would then see  '  - 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 = ""

Notice in the from member, (msg.from) I can define an email, but how can I define the sender description using componentpro mail API?




Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index