(C#) Transition from MailMan.GetPop3SslServerCert to MailMan.GetServerCert
Provides instructions for replacing deprecated GetPop3SslServerCert method calls with GetServerCert. Note: This example requires Chilkat v11.0.0 or greater.
Chilkat.MailMan mailman = new Chilkat.MailMan();
// ...
// ...
// ------------------------------------------------------------------------
// The GetPop3SslServerCert method is deprecated:
Chilkat.Cert certObj = mailman.GetPop3SslServerCert();
if (mailman.LastMethodSuccess == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using GetServerCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
// We want the POP3 email server certificate..
bool useSmtp = false;
Chilkat.Cert certOut = new Chilkat.Cert();
bool success = mailman.GetServerCert(useSmtp,certOut);
if (success == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}
|