1        ConeĀ©
2
3MAIL::ACCOUNT::CREAT(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::CREAT(3x)
4
5
6

NAME

8       mail::ACCOUNT::createFolder - Create a new folder
9

SYNOPSIS

11       #include <libmail/sync.H>
12
13       mail::ACCOUNT *mail;
14       mail::folder *folder;
15
16       mail::folder *f=mail->createFolder(const mail::folder *parentFolder,
17                                          std::string name,
18                                          bool createDirectory);
19
20       bool ok=mail->createFolder(const mail::folder *folder,
21                                  bool createDirectory);
22
23                                  std::string errmsg=mail->getErrmsg();
24

USAGE

26       Most mail accounts support the ability to create and delete folders,
27       which are arranged in a tree-like hierarchy.
28       mail::ACCOUNT::createFolder creates a new folder. There are two
29       versions of this function.
30
31       The first version creates a subfolder of an existing folder,
32       parentFolder.  name is the new folder's name, in the application's
33       character set. If the folder is succesfully created a mail::folder
34       object is returned that represents the newly-created folder (the
35       application is responsible for destroying the new mail::folder object).
36
37       The second version creates a new folder that's specified by an existing
38       mail::folder object (which is usually created by
39       mail::ACCOUNT::getFolderFromString(3x) or
40       mail::ACCOUNT::getFolderFromPath(3x)).
41
42           Note
43           createDirectory should be set to true to create a new folder
44           directory, and false for a regular folder. See
45           mail::folder::createSubFolder(3x) for more information.
46
47           Note
48           Some mail servers reserve certain characters which cannot be used
49           in folder names. IMAP mail servers use a special character (usually
50           "/" or ".") as a separator between names in a hierarchical folder
51           path. The actual character varies from server to server. An attempt
52           to create/rename a folder whose name includes a reserved character
53           will fail. Different IMAP servers use different hierarchy separator
54           characters. An attempt to create a folder may fail on one IMAP
55           server even if another IMAP server can succesfully create a folder
56           with the same name. This is, unfortunately, a design flaw in the
57           IMAP protocol.
58
59           Note
60           Maildir folders created by are compatible and can be read by the
61           Courier-IMAP[1] server. Names of maildir folders may contain any
62           character, including the characters ":", "/", ".", "~", and ":".
63           However, if the same folders are exported via IMAP, folders whose
64           name includes these characters may not be readable by some IMAP
65           clients. Even a LibMAIL application may not be able to read one of
66           these folders via IMAP.
67
68           Note
69           Mbox mail folders created by LibMAIL are mostly compatible and can
70           be exported by IMAP servers that read mbox-formatted mail folders
71           (with some limitations, such as that the same mbox folder cannot be
72           open by LibMAIL and another application at the same time). Names of
73           mbox folders can contain any character, including the characters
74           "/", and "~". However if mbox folders are exported via IMAP,
75           folders whose name includes these characters may not be readable by
76           some IMAP clients.
77

RETURN CODES AND CALLBACKS

79       This first mail::ACCOUNT::createFolder function returns a NULL pointer
80       if it cannot create the new folder, for some reason; the second
81       mail::ACCOUNT::createFolder function returns false if it fails.
82

SEE ALSO

84       mail::ACCOUNT::getFolderFromPath(3x),
85       mail::ACCOUNT::getFolderFromString(3x),
86       mail::folder::createSubFolder(3x), mail::setAppCharset(3x).
87

AUTHOR

89       Sam Varshavchik
90

NOTES

92        1. Courier-IMAP
93           http://www.courier-mta.org
94
95
96
97ConeĀ©                             08/25/2016          MAIL::ACCOUNT::CREAT(3x)
Impressum