This function searches a mail server for new mail.
Header file: | Msgstor2.h |
Platforms: | H/PC 3.0 |
Windows CE versions: | 2.10 and later |
BOOL TransportCheckForNewMail( HANDLE hService,
CHECKFORNEWMAILCALLBACK pfnCheckNewMailCallback);
BOOL _cdecl CheckNewMailCallback (lpTransportCheckForNewMailInfo *pInfo)
TRUE indicates the function has successfully initiated the callback function on the server. FALSE indicates failure. To get extended error information, call the function TransportError or TransportErrorMsg.
The transport service provider must implement this function in a DLL registered as a mail service. The Inbox application can then load this DLL and call this function.
When checking for new mail, call the function CheckNewMailCallback twice. First, use the callback function to obtain the list of folders to search for new messages. Signal this by setting the fFree parameter of the pInfo structure to FALSE. After checking for new messages, signal the callback function to release the storage used by the TransportFolderList structure by setting fFree to TRUE. When releasing storage, ignore szFriendlyName members in the TransportFolderInfo structures in TransportFolderList.