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