Go
Go
Transition from Email.GetEncryptedByCert to Email.LastDecryptCert
Provides instructions for replacing deprecated GetEncryptedByCert method calls with LastDecryptCert.Chilkat Go Downloads
success := false
email := chilkat.NewEmail()
// ...
// ...
// ------------------------------------------------------------------------
// The GetEncryptedByCert method is deprecated:
certObj := email.GetEncryptedByCert()
if email.LastMethodSuccess() == false {
fmt.Println(email.LastErrorText())
email.DisposeEmail()
return
}
// ...
// ...
certObj.DisposeCert()
// ------------------------------------------------------------------------
// Do the equivalent using LastDecryptCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
certOut := chilkat.NewCert()
success = email.LastDecryptCert(certOut)
if success == false {
fmt.Println(email.LastErrorText())
email.DisposeEmail()
certOut.DisposeCert()
return
}
email.DisposeEmail()
certOut.DisposeCert()