(C#) Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml. Note: This example requires Chilkat v11.0.0 or greater.
Chilkat.MailMan mailman = new Chilkat.MailMan();
// ...
// ...
string filePath = "c:/example/emailBundle.xml";
// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:
Chilkat.EmailBundle bundleObj = mailman.LoadXmlFile(filePath);
if (mailman.LastMethodSuccess == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXml.
Chilkat.EmailBundle bundle = new Chilkat.EmailBundle();
bool success = bundle.LoadXml(filePath);
if (success == false) {
Debug.WriteLine(bundle.LastErrorText);
return;
}
|