From Property

This property specifies the display name of email original sender.

Data Type: String


This property is not required to send email. Use this property only if you want your email address to be displayed with a name instead of an email address. Default value is sender's email address.

[Visual Basic] The following example demonstrates how to load certificate to encrypt email with EASendMail SMTP Component. To get the full samples of EASendMail, please refer to Samples section.

[VB6, VBA - Set From Name]
Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail
  oSmtp.LicenseCode = "TryIt"
  oSmtp.ServerAddr = ""
  ' user authentication
  oSmtp.UserName = ""
  oSmtp.Password = "test"
  'If your server requires SSL connection 
  'oSmtp.SSL_starttls = 0 
  'oSmtp.ServerPort = 465
  ''If your server requires TLS connection 
  'oSmtp.SSL_starttls = 1 
  'oSmtp.ServerPort = 25
  oSmtp.From = "Test User"
  oSmtp.FromAddr = ""
  oSmtp.AddRecipient "Support Team", "", 0

  oSmtp.Subject = "Test"
  oSmtp.BodyText = "Hello, this is a test...."
  If oSmtp.SendMail() = 0 Then
    MsgBox "Message delivered!"
    MsgBox oSmtp.GetLastErrDescription()
  End If
End Sub

See Also

FromAddr Property