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