1MAIL::ACCOUNT::CHECK(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::CHECK(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 bool ok=mail->checkNewMail(void);
14
16 This method returns an indication whether the current open folder was
17 changed. The name is slightly misleading; mail::ACCOUNT::checkNewMail
18 also indicates whether messages have been removed from the folder, and
19 whether the status of any message has changed.
20
21 Most mail servers allow multiple applications to use the same folder.
22 Therefore, changes to the folderĀ“s contents may occur at any time. This
23 method should be used prior to starting any operation that intends to
24 use an existing message. If mail::ACCOUNT::checkNewMail returns true,
25 the application should then use mail::ACCOUNT::getFolderIndexSize(3x)
26 and mail::ACCOUNT::getFolderIndexInfo(3x) to read the current folder
27 index, and compare the current list of message UIDs against the
28 previously obtained list in order to determine which messages were
29 added or removed from the folder.
30
32 This function returns true if there were any changes to the folderĀ“s
33 contents after the folder was opened, or since the previous call to
34 mail::ACCOUNT::checkNewMail.
35
36 Note
37 Calling mail::ACCOUNT::updateFolderIndexInfo(3x),
38 mail::ACCOUNT::updateFolderIndexFlags(3x), and all other methods
39 that modify the contents of the current folder will usually result
40 in the next call to mail::ACCOUNT::checkNewMail returning true.
41
43 mail::ACCOUNT::saveFolderIndexInfo(3x),
44 mail::ACCOUNT::getFolderIndexInfo(3x).
45
46
47
48[FIXME: source] 05/08/2010 MAIL::ACCOUNT::CHECK(3x)