(Unicode C) Example: MailMan.FetchAll method
Demonstrates how to call the FetchAll method. Note: This example requires Chilkat v11.0.0 or greater.
#include <C_CkMailManW.h>
#include <C_CkEmailBundleW.h>
void ChilkatSample(void)
{
BOOL success;
HCkMailManW mailman;
HCkEmailBundleW bundle;
BOOL keepOnServer;
BOOL headersOnly;
int numBodyLines;
success = FALSE;
success = FALSE;
mailman = CkMailManW_Create();
// Setup mailman with POP3 server and login settings...
// ...
// ...
bundle = CkEmailBundleW_Create();
keepOnServer = TRUE;
headersOnly = FALSE;
// numBodyLines only applies if downloading headers-only.
numBodyLines = 0;
success = CkMailManW_FetchAll(mailman,keepOnServer,headersOnly,numBodyLines,bundle);
if (success == FALSE) {
wprintf(L"%s\n",CkMailManW_lastErrorText(mailman));
CkMailManW_Dispose(mailman);
CkEmailBundleW_Dispose(bundle);
return;
}
// ...
// ...
CkMailManW_Dispose(mailman);
CkEmailBundleW_Dispose(bundle);
}
|