(C#) Transition from MailMan.GetAllHeaders to MailMan.FetchAll
Provides instructions for replacing deprecated GetAllHeaders method calls with FetchAll. Note: This example requires Chilkat v11.0.0 or greater.
Chilkat.MailMan mailman = new Chilkat.MailMan();
// ...
// ...
int numBodyLines = 5;
// ------------------------------------------------------------------------
// The GetAllHeaders method is deprecated:
Chilkat.EmailBundle bundleObj = mailman.GetAllHeaders(numBodyLines);
if (mailman.LastMethodSuccess == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using FetchAll.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
bool keepOnServer = true;
bool headersOnly = true;
Chilkat.EmailBundle bundleOut = new Chilkat.EmailBundle();
bool success = mailman.FetchAll(keepOnServer,headersOnly,numBodyLines,bundleOut);
if (success == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}
|