ClientRequest Property


Contains last command string sent to SMTP server by MailBee.

This property is useful for debugging purposes (in conjunction with ServerResponse property).


Value Type: String
Parameters: None 
Remarks: This property is read-only

Usage example:

Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.SMTP")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.SMTP")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "mail.server.com"
If Mailer.Connect Then
  Mailer.Message.ToAddr = "bill@yoursite.com"
  Mailer.Message.FromAddr = "joe@mysite.com"
  Mailer.Message.Subject = "Hello"
  Mailer.Message.ImportBodyText "C:\docs\letter.htm", True
  If Not Mailer.Send Then
    If Mailer.ErrCode > 100 Then ' SMTP-specific error, i.e. not connection error
      MsgBox "Last command sent: " & Mailer.ClientRequest
      MsgBox "Server rejected the message and responded: " & Mailer.ServerResponse
    Else
      MsgBox Mailer.ErrDesc ' Timeout occurred, connection lost, etc.
    End If
  End If
  Mailer.Disconnect
Else
  If Mailer.ErrCode > 100 Then ' SMTP-specific error, i.e. not connection error
    MsgBox "Last command sent: " & Mailer.ClientRequest
    MsgBox "Server rejected the connection and responded: " & Mailer.ServerResponse
  Else
    MsgBox Mailer.ErrDesc ' Server not responding, timeout during connecting, etc.
  End If
End If

See Also:

ServerResponse Property


Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.