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