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