Lianja
Lianja
Authenticate with the POP3 Server
See more POP3 Examples
Demonstrates the Chilkat MailMan.Pop3Authenticate method, which authenticates with the POP3 server using the current POP3 property settings, such as PopUsername and PopPassword. It is typically called after Pop3Connect. This example connects and then authenticates.
Background: POP3 authentication is the step, after connecting, where the client identifies itself — classically with the
USER and PASS commands, or a more secure mechanism. Calling Pop3Connect and Pop3Authenticate as distinct steps lets you determine precisely which phase fails, and lets you hold an authenticated session open to perform several mailbox operations before ending it with Pop3EndSession.Chilkat Lianja Downloads
llSuccess = .F.
// Demonstrates the MailMan.Pop3Authenticate method, which authenticates with the POP3 server
// using the current POP3 property settings (such as PopUsername and PopPassword). It is
// typically called after Pop3Connect.
loMailman = createobject("CkMailMan")
// Configure the POP3 server connection.
loMailman.MailHost = "pop.example.com"
loMailman.MailPort = 995
loMailman.PopSsl = .T.
loMailman.PopUsername = "user@example.com"
loMailman.PopPassword = "myPassword"
// Connect first, then authenticate.
llSuccess = loMailman.Pop3Connect()
if (llSuccess = .F.) then
? loMailman.LastErrorText
release loMailman
return
endif
llSuccess = loMailman.Pop3Authenticate()
if (llSuccess = .F.) then
? loMailman.LastErrorText
release loMailman
return
endif
? "Authenticated with the POP3 server."
release loMailman