ComputerName Property

Domain name to send in HELO/EHLO command

Data Type: String


In HELO/EHLO SMTP command, a domain name is required to identify your current computer. The default value is your current machine name. You can change this value by ComputerName property.

If you use FastSender object to send email, please refer to ComputerName property of FastSender.


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

Const ConnectNormal = 0
Const ConnectSSLAuto = 1
Const ConnectSTARTTLS = 2
Const ConnectDirectSSL = 3
Const ConnectTryTLS = 4

Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail
  ' for evaluation usage, please use "TryIt" as the license code.
  oSmtp.LicenseCode = "TryIt"
  ' Your SMTP server address
  oSmtp.ServerAddr = ""

  ' User and password for ESMTP authentication
  oSmtp.UserName = ""
  oSmtp.Password = "test"

  ' ConnectTryTLS means if server supports SSL/TLS connection, SSL/TLS is used automatically
  oSmtp.ConnectType = ConnectTryTLS

  oSmtp.ComputerName = "LocalIP"

  oSmtp.FromAddr = ""
  oSmtp.AddRecipient "Support Team", "", 0
  oSmtp.BodyText = "Hello, this is a test...."

  If oSmtp.SendMail() = 0 Then
    MsgBox "Message delivered!"
    MsgBox oSmtp.GetLastErrDescription()
  End If
End Sub

[Visual C++] #include "stdafx.h" #include <tchar.h> #include <Windows.h> #include "EASendMailObj.tlh" using namespace EASendMailObjLib; const int ConnectNormal = 0; const int ConnectSSLAuto = 1; const int ConnectSTARTTLS = 2; const int ConnectDirectSSL = 3; const int ConnectTryTLS = 4; void SendEmail() { ::CoInitialize(NULL); IMailPtr oSmtp = NULL; oSmtp.CreateInstance(__uuidof(EASendMailObjLib::Mail)); oSmtp->LicenseCode = _T("TryIt"); // Your SMTP server address oSmtp->ServerAddr = _T(""); // User and password for ESMTP authentication, oSmtp->UserName = _T(""); oSmtp->Password = _T("testpassword"); // ConnectTryTLS means if server supports SSL/TLS connection, SSL/TLS is used automatically oSmtp->ConnectType = ConnectTryTLS; oSmtp->ComputerName = _T(""); oSmtp->FromAddr = _T(""); oSmtp->AddRecipient(_T("Support Team"), _T(""), 0); if(oSmtp->SendMail() == 0) { _tprintf(_T("email was sent successfully!\r\n")); } else { _tprintf(_T("failed to send email with the following error: %s\r\n"), (const TCHAR*)oSmtp->GetLastErrDescription()); } }