1mail::ACCOUNT::checkNmeawiMla:i:lA(C3CxO)UNT Synchronous APmIairle:f:eArCeCnOcUeNT::checkNewMail(3x)
2
3
4
6 mail::ACCOUNT::checkNewMail - Check for new mail in the current folder
7
9 #include <libmail/sync.H>
10
11 mail::ACCOUNT *mail;
12
13
14
15 bool ok=mail->checkNewMail(void);
16
18 This method returns an indication whether the current open folder was
19 changed. The name is slightly misleading; mail::ACCOUNT::checkNewMail
20 also indicates whether messages have been removed from the folder, and
21 whether the status of any message has changed.
22
23 Most mail servers allow multiple applications to use the same folder.
24 Therefore, changes to the folder's contents may occur at any time.
25 This method should be used prior to starting any operation that intends
26 to use an existing message. If mail::ACCOUNT::checkNewMail returns
27 true, the application should then use mail::ACCOUNT::getFolderIndex‐
28 Size(3x) and mail::ACCOUNT::getFolderIndexInfo(3x) to read the current
29 folder index, and compare the current list of message UIDs against the
30 previously obtained list in order to determine which messages were
31 added or removed from the folder.
32
34 This function returns true if there were any changes to the folder's
35 contents after the folder was opened, or since the previous call to
36 mail::ACCOUNT::checkNewMail.
37
38 Note: Calling mail::ACCOUNT::updateFolderIndexInfo(3x),
39 mail::ACCOUNT::updateFolderIndexFlags(3x), and all other methods
40 that modify the contents of the current folder will usually
41 result in the next call to mail::ACCOUNT::checkNewMail returning
42 true.
43
45 mail::ACCOUNT::saveFolderIndexInfo(3x), mail::ACCOUNT::getFolderIndex‐
46 Info(3x).
47
48
49
50 10 April 2006 mail::ACCOUNT::checkNewMail(3x)