LogFileName Property

Log file to record all transactions between client and server.

Data Type: String


Log file will be created if it does not exist; otherwise new content will be appended at the end of the file..


[Visual Basic, Visual C++] 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 = "smtp.emailarchitect.net"

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

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

  oSmtp.LogFileName = "c:\smtp.log"

  oSmtp.FromAddr = "test@adminsystem.net"
  oSmtp.AddRecipient "Support Team", "support@adminsystem.net", 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("smtp.emailarchitect.net"); // User and password for ESMTP authentication, oSmtp->UserName = _T("test@emailarchitect.net"); oSmtp->Password = _T("testpassword"); // ConnectTryTLS means if server supports SSL/TLS connection, SSL/TLS is used automatically oSmtp->ConnectType = ConnectTryTLS; oSmtp->LogFileName = _T("c:\\smtp.log"); oSmtp->FromAddr = _T("test@emailarchitect.net"); oSmtp->AddRecipient(_T("Support Team"), _T("support@adminsystem.net"), 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()); } }