Delphi DLL
Delphi DLL
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 Delphi DLL Downloads
var
success: Boolean;
mailman: HCkMailMan;
loggedIn: Boolean;
begin
success := False;
// 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.
mailman := CkMailMan_Create();
// Configure the POP3 server connection.
CkMailMan_putMailHost(mailman,'pop.example.com');
CkMailMan_putMailPort(mailman,995);
CkMailMan_putPopSsl(mailman,True);
CkMailMan_putPopUsername(mailman,'user@example.com');
CkMailMan_putPopPassword(mailman,'myPassword');
// Test both connectivity and login.
loggedIn := CkMailMan_VerifyPopLogin(mailman);
if (loggedIn = True) then
begin
Memo1.Lines.Add('Successfully connected and logged in to the POP3 server.');
end
else
begin
Memo1.Lines.Add('POP3 connect or login failed.');
end;
CkMailMan_Dispose(mailman);