FromAddr Property

This property specifies the sender's email address.


Data Type: String


Remarks

This property is required to send mail. The value specified by this property is used with SMTP "MAIL FROM" command during SMTP conversation. Most SMTP servers accept mail from all addresses. However, some SMTP servers use filter and will only accept email from specific senders.

Usage Example:

[Visual Basic]

Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail

  oSmtp.ServerAddr = "mail.adminsystem.net"
  
  'The license code for EASendMail ActiveX Object, 
  'for evaluation usage, please use "TryIt" as the license code.
  oSmtp.LicenseCode = "TryIt"
  
  oSmtp.ServerAddr = "mail.adminsystem.net"
  
  'If your server require user authentication 
  'oSmtp.UserName = "test@adminsystem.net"
  'oSmtp.Password = "test"
  
  'If your server requires SSL connection 
  'oSmtp.SSL_init 
  'oSmtp.SSL_starttls = 0 
  'oSmtp.ServerPort = 465
  
  ''If your server requires TLS connection 
  'oSmtp.SSL_init 
  'oSmtp.SSL_starttls = 1 
  'oSmtp.ServerPort = 25
  
  oSmtp.From = "Test User"
  oSmtp.FromAddr = "test@adminsystem.net"
  oSmtp.AddRecipient "Support Team", "support@adminsystem.net", 0

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

See Also

From Property