(C) Example: MailMan.FetchAll method
Demonstrates how to call the FetchAll method. Note: This example requires Chilkat v11.0.0 or greater.
#include <C_CkMailMan.h>
#include <C_CkEmailBundle.h>
void ChilkatSample(void)
{
BOOL success;
HCkMailMan mailman;
HCkEmailBundle bundle;
BOOL keepOnServer;
BOOL headersOnly;
int numBodyLines;
success = FALSE;
success = FALSE;
mailman = CkMailMan_Create();
// Setup mailman with POP3 server and login settings...
// ...
// ...
bundle = CkEmailBundle_Create();
keepOnServer = TRUE;
headersOnly = FALSE;
// numBodyLines only applies if downloading headers-only.
numBodyLines = 0;
success = CkMailMan_FetchAll(mailman,keepOnServer,headersOnly,numBodyLines,bundle);
if (success == FALSE) {
printf("%s\n",CkMailMan_lastErrorText(mailman));
CkMailMan_Dispose(mailman);
CkEmailBundle_Dispose(bundle);
return;
}
// ...
// ...
CkMailMan_Dispose(mailman);
CkEmailBundle_Dispose(bundle);
}
|