Sample code for 30+ languages & platforms
Xbase++ Requires Chilkat v11.0.0+

Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert

Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oMailman
LOCAL oCertObj
LOCAL nUseSmtp
LOCAL oCertOut

nSuccess := 0

oMailman := CreateObject("Chilkat.MailMan")

//  ...
//  ...

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

oCertObj := oMailman:GetSmtpSslServerCert()
IF (oMailman:LastMethodSuccess == 0)
    ? oMailman:LastErrorText
    oMailman:destroy()
    RETURN
ENDIF

//  ...
//  ...

oCertObj:destroy()

//  ------------------------------------------------------------------------
//  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..
nUseSmtp := 1

oCertOut := CreateObject("Chilkat.Cert")
nSuccess := oMailman:GetServerCert(nUseSmtp, oCertOut)
IF (nSuccess == 0)
    ? oMailman:LastErrorText
    oMailman:destroy()
    oCertOut:destroy()
    RETURN
ENDIF

oMailman:destroy()
oCertOut:destroy()