Sample code for 30+ languages & platforms
PowerBuilder

Verify Connectivity to the POP3 Server

See more POP3 Examples

Demonstrates the Chilkat MailMan.VerifyPopConnection method, which tests whether a TCP/IP connection can be established with the configured POP3 server. It verifies connectivity only — it does not authenticate. This example configures the POP3 host and checks whether it can be reached.

Background: This is the POP3 counterpart to VerifySmtpConnection. It answers the first diagnostic question — can the client reach the POP3 server on the configured host and port and complete the TLS handshake? A failure here indicates a network, firewall, DNS, port, or certificate problem rather than a credentials issue, which VerifyPopLogin checks next.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
oleobject loo_Mailman
integer li_Connected

//  Demonstrates the MailMan.VerifyPopConnection method, which tests whether a TCP/IP
//  connection can be established with the configured POP3 server.  It verifies connectivity
//  only (it does not authenticate).

loo_Mailman = create oleobject
li_rc = loo_Mailman.ConnectToNewObject("Chilkat.MailMan")
if li_rc < 0 then
    destroy loo_Mailman
    MessageBox("Error","Connecting to COM object failed")
    return
end if

//  Configure the POP3 server connection.
loo_Mailman.MailHost = "pop.example.com"
loo_Mailman.MailPort = 995
loo_Mailman.PopSsl = 1

//  Test connectivity to the POP3 server.
li_Connected = loo_Mailman.VerifyPopConnection()

if li_Connected = 1 then
    Write-Debug "Successfully connected to the POP3 server."
else
    Write-Debug "Could not connect to the POP3 server."
end if



destroy loo_Mailman