property Message.From as String

Retrieves or sets a value that indicates the email address of the sender.

TypeDescription
String A string expression that indicates the email address of the sender. The string can contain the name of the sender between "" and the email address between brackets <>, like this "Mike" <mike@margs.com> or simple like: mike@margs.com

Use From property to specify the email address of the sender. Also, you can use the From optional argument of the Send method to set up the sender's email address. Some SMTP servers doesn't accept any email address for the sender. Some of the SMTP servers checks if the domain of the email address exists. The following sample shows how to set the name of sender:

Dim WithEvents e As EMail

Private Sub e_EndSend(ByVal Msg As EXEMAILLibCtl.IMessage)
    Debug.Print e.Error(Msg.LastError)
End Sub

Private Sub Form_Load()
    Set e = Runtime1.NewEMail()
    Dim m As Message
    Set m = Runtime1.NewMessage
    Set m.Notifier = e
    m.From = """Mike Philips"" <mike@sodkex.com>"
    m.Send , "jhon@margo.com", "Hi", "Hi buddy!"
End Sub