C#
C#
Transition from MailMan.TransferMail to MailMan.FetchAll
Provides instructions for replacing deprecated TransferMail method calls with FetchAll.Chilkat C# Downloads
bool success = false;
Chilkat.MailMan mailman = new Chilkat.MailMan();
// ...
// ...
// ------------------------------------------------------------------------
// The TransferMail method is deprecated:
Chilkat.EmailBundle bundleObj = mailman.TransferMail();
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 = false;
bool headersOnly = false;
// Irrelevent because we are not downloading headers-only.
int numBodyLines = 0;
Chilkat.EmailBundle bundleOut = new Chilkat.EmailBundle();
success = mailman.FetchAll(keepOnServer,headersOnly,numBodyLines,bundleOut);
if (success == false) {
Debug.WriteLine(mailman.LastErrorText);
return;
}