DataFlex
DataFlex
Verify POP3 Login (Connect and Authenticate)
See more POP3 Examples
Demonstrates the Chilkat MailMan.VerifyPopLogin method, which tests whether Chilkat can connect to the configured POP3 server and successfully log in using the current POP3 authentication settings. This example configures the POP3 host and credentials and verifies login.
Background: POP3 login is the
USER/PASS (or APOP/SASL) exchange that follows connecting. VerifyPopLogin performs the full round trip — connect, TLS, and authenticate — making it the go-to preflight check for validating a mailbox's credentials. A false result after VerifyPopConnection succeeds isolates the problem to the username or password.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoMailman
Boolean iLoggedIn
Move False To iSuccess
// Demonstrates the MailMan.VerifyPopLogin method, which tests whether Chilkat can connect to
// the configured POP3 server and successfully log in using the current POP3 authentication
// settings.
Get Create (RefClass(cComChilkatMailMan)) To hoMailman
If (Not(IsComObjectCreated(hoMailman))) Begin
Send CreateComObject of hoMailman
End
// Configure the POP3 server connection.
Set ComMailHost Of hoMailman To "pop.example.com"
Set ComMailPort Of hoMailman To 995
Set ComPopSsl Of hoMailman To True
Set ComPopUsername Of hoMailman To "user@example.com"
Set ComPopPassword Of hoMailman To "myPassword"
// Test both connectivity and login.
Get ComVerifyPopLogin Of hoMailman To iLoggedIn
If (iLoggedIn = True) Begin
Showln "Successfully connected and logged in to the POP3 server."
End
Else Begin
Showln "POP3 connect or login failed."
End
End_Procedure