ServerResponse Property


Returns last reply of POP3 server. This reply is returned as a result of last command sent to the server (the text of this command is available through ClientRequest property value). Be aware that ServerResponse string is sometimes as big as message size (for example, when using RetrieveSingleMessage or RetrieveMessages methods).

Use this property if you need exact knowledge of what server reply is. For example, if user authentication failed even if UserName and Password were correct and network connection was stable, you may check this property to determine why POP3 server rejected the connection. Logging feature is also helpful for debugging purposes (EnableLogging property).

In the rest of cases Licensed/ErrDesc/ErrCode/IsError properties would be enough for organizing error-handling mechanism.


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.POP3")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.POP3")
'In ASP use Response.Write instead of MsgBox
Mailer.EnableLogging = True
Mailer.LogFilePath = "C:\my_log.txt"
Mailer.ClearLog
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "mailserver.com"
Mailer.UserName = "MyName"
Mailer.Password = "Wrong password"
Mailer.Connect
If Not Mailer.IsError Then
  MsgBox "Connected successfully"
  Mailer.Disconnect
ElseIf Mailer.ErrCode > 200 Then ' POP3-specific error, i.e. not connection error
  MsgBox "Server responded: " & Mailer.ServerResponse
Else
  MsgBox Mailer.ErrDesc
End If

See Also:

ClientRequest Property
Licensed Property
IsError Property
ErrCode Property
ErrDesc Property
EnableLogging Property
LogFilePath Property


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