Sample code for 30+ languages & platforms
Go

Transition from MailMan.GetPop3SslServerCert to MailMan.GetServerCert

Provides instructions for replacing deprecated GetPop3SslServerCert method calls with GetServerCert.

Chilkat Go Downloads

Go
    success := false

    mailman := chilkat.NewMailMan()

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The GetPop3SslServerCert method is deprecated:

    certObj := mailman.GetPop3SslServerCert()
    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 POP3 email server certificate..
    useSmtp := false

    certOut := chilkat.NewCert()
    success = mailman.GetServerCert(useSmtp,certOut)
    if success == false {
        fmt.Println(mailman.LastErrorText())
        mailman.DisposeMailMan()
        certOut.DisposeCert()
        return
    }


    mailman.DisposeMailMan()
    certOut.DisposeCert()