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