1 Cone©
2
3MAIL::ACCOUNT::OPENF(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::OPENF(3x)
4
5
6
8 mail::ACCOUNT::openFolder - Open a folder
9
11 #include <libmail/sync.H>
12
13 mail::ACCOUNT *mail;
14
15 bool ok=mail->openFolder(const mail::folder *folder);
16
17 std::string errmsg=mail->getErrmsg();
18
20 A mail folder must be formally "opened" before the messages in the
21 folder may be accessed. Each mail account can have only one mail folder
22 at any time Opening another folder automatically "closes" the previous
23 folder.
24
25 Note
26 Different mail::account or mail::ACCOUNT objects may each have a
27 folder opened, at the same time. It is possible to create multiple
28 mail::account or mail::ACCOUNT objects that refer to the same
29 actual mail account. Whether it is possible to access the same
30 account multiple times, using different objects, and whether each
31 object may have the same folder opened depends on the account type
32 and/or the remote server.
33
34 · Whether it's possible to open the same remote IMAP or POP3
35 account more than once depends on the remote IMAP/POP3 server.
36
37 · Whether it's possible to open the same folder on a remote IMAP
38 server account more than once depends on the remote IMAP/POP3
39 server. Most IMAP servers allow the same account to be opened
40 more than once, as long as the different login sessions do not
41 try to open the same folder. Some IMAP servers allow the same
42 folder to be opened simultaneously by multiple sessions.
43
44 · It is generally possible to open the same local mail folder
45 simultaneously, via multiple mail::account objects, as long as
46 only one pending request is issued at a time. Concurrent access
47 to local maildirs generally works well, however simultaneous
48 access to the same mbox folder may be rather slow, due to the
49 overhead of locking and rescanning of the folder by each
50 mail::account object.
51
52 Any previously-opened folder is closed before the an attempt to open
53 this folder is made. If the new folder cannot be opened, the previous
54 folder is still considered closed.
55
57 This method returns true if it succeeds, or false if it fails. If the
58 method fails, use mail::ACCOUNT::getErrmsg() to read a brief
59 description of the error.
60
62 mail::ACCOUNT::getTopLevelFolders(3x),
63 mail::ACCOUNT::readFolderInfo(3x).
64
66 Sam Varshavchik
67
68
69
70Cone© 08/25/2016 MAIL::ACCOUNT::OPENF(3x)