Go
Go
Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert
Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.Chilkat Go Downloads
success := false
mailman := chilkat.NewMailMan()
// ...
// ...
// ------------------------------------------------------------------------
// The GetSmtpSslServerCert method is deprecated:
certObj := mailman.GetSmtpSslServerCert()
if mailman.LastMethodSuccess() == false {
fmt.Println(mailman.LastErrorText())
mailman.DisposeMailMan()
return
}
// ...
// ...
certObj.DisposeCert()
// ------------------------------------------------------------------------
// 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..
useSmtp := true
certOut := chilkat.NewCert()
success = mailman.GetServerCert(useSmtp,certOut)
if success == false {
fmt.Println(mailman.LastErrorText())
mailman.DisposeMailMan()
certOut.DisposeCert()
return
}
mailman.DisposeMailMan()
certOut.DisposeCert()