(Go) Transition from Email.CreateReply to Email.ToReply
Provides instructions for replacing deprecated CreateReply method calls with ToReply. Note: This example requires Chilkat v11.0.0 or greater.
email := Email_Ref.html">chilkat.NewEmail()
// ...
// ...
// ------------------------------------------------------------------------
// The CreateReply method is deprecated:
emailObj := email.CreateReply()
if email.LastMethodSuccess() == false {
fmt.Println(email.LastErrorText())
email.DisposeEmail()
return
}
// ...
// ...
emailObj.DisposeEmail()
// ------------------------------------------------------------------------
// Do the equivalent using ToReply.
// Your application creates a new, empty Email_Ref.html">Email object which is passed
// in the last argument and filled upon success.
emailOut := Email_Ref.html">chilkat.NewEmail()
success := email.ToReply(emailOut)
if success == false {
fmt.Println(email.LastErrorText())
email.DisposeEmail()
emailOut.DisposeEmail()
return
}
email.DisposeEmail()
emailOut.DisposeEmail()
|