LocalIP Property

Specify the local IP address binding for sending email.

Data Type: String


By default, Mail object uses the default IP address of current machine to send email. However, if there are mulitple IP addresses on current machine, you can specify one of IP address to bind and send the email.


[Visual Basic] To get the full samples of EASendMail, please refer to Samples section.

[VB6, VBA - Send Email with IP address binding]
Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail

  oSmtp.LicenseCode = "TryIt"
  oSmtp.ServerAddr = "mail.emailarchitect.net"
  oSmtp.LocalIP = ""
  'If your server require user authentication 
  'oSmtp.UserName = "test@emailarchitect.net"
  '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 = "test@emailarchitect.net"
  oSmtp.AddRecipient "Support Team", "support@emailarchitect.net", 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