Ping Method


Sends "noop" command to POP3 server.

You may use this method to keep connection with POP3 server alive.


blnResult = ObjectName.Ping  
Parameters: None 
Return value As Boolean True if successful, False if error occurred (usually connection failure)  

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.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
  ' Start doing some long-lasting job here
  Mailer.Ping ' Call Ping to remind the server about us
  ' Continue long-lasting job
  Mailer.Disconnect
End If

See Also:

POP3 Object


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