Sample code for 30+ languages & platforms
C#

Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert

Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.

Chilkat C# Downloads

C#
bool success = false;

Chilkat.MailMan mailman = new Chilkat.MailMan();

// ...
// ...

// ------------------------------------------------------------------------
// The GetSmtpSslServerCert method is deprecated:

Chilkat.Cert certObj = mailman.GetSmtpSslServerCert();
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 SMTP email server certificate..
bool useSmtp = true;

Chilkat.Cert certOut = new Chilkat.Cert();
success = mailman.GetServerCert(useSmtp,certOut);
if (success == false) {
    Debug.WriteLine(mailman.LastErrorText);
    return;
}