(C#) Transition from MailMan.LoadXmlEmailString to Email.SetFromXmlText
Provides instructions for replacing deprecated LoadXmlEmailString method calls with Email.SetFromXmlText. Note: This example requires Chilkat v11.0.0 or greater.
Chilkat.MailMan mailman = new Chilkat.MailMan();
// ...
// ...
string xmlStr = "...";
// ------------------------------------------------------------------------
// The LoadXmlEmailString method is deprecated:
Chilkat.Email emailObj = mailman.LoadXmlEmailString(xmlStr);
if (mailman.LastMethodSuccess == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using Email.SetFromXmlText.
Chilkat.Email email = new Chilkat.Email();
bool success = email.SetFromXmlText(xmlStr);
if (success == false) {
Debug.WriteLine(email.LastErrorText);
return;
}
|