1mail::ACCOUNT::moveMemsasialg:e:sATCoC(O3UxN)T SynchronousmAaPiIl:r:eAfCeCrOeUnNcTe::moveMessagesTo(3x)
2
3
4

NAME

6       mail::ACCOUNT::moveMessagesTo - Move messages to another folder
7

SYNOPSIS

9       #include <libmail/sync.H>
10
11
12       mail::ACCOUNT *mail;
13       mail::folder *folder;
14
15
16
17       bool   ok=mail->moveMessagesTo   (const  std::vector<size_t>  &msgList,
18       mail::folder *copyTo);
19
20       std::string errmsg=mail->getErrmsg();
21

USAGE

23       msgList specifies a list of messages.  Messages are  numbered  starting
24       with  message #0 and up to one less than mail::ACCOUNT::getFolderIndex‐
25       Size(3x) (when mail::account::getFolderIndexSize returns  6,  the  mes‐
26       sages  are  numbered  0  through  5).  Only the messages that appear in
27       msgList are processed by this request.  When a message is removed  from
28       the  folder, by mail::ACCOUNT::updateFolderIndexInfo(3x), the following
29       messages are renumbered accordingly.
30
31              Note: Most mail servers allow multiple applications to open  the
32              same  folder.   Therefore,  changes to the folder's contents can
33              occur at any time.  Before making this request, the  application
34              should  use  mail::ACCOUNT::checkNewMail(3x)  to  verify that no
35              unexpected changes have been made to the folder's contents.
36
37       mail::ACCOUNT::moveMessagesTo  moves  messages  in  the  currently-open
38       folder  to  another  folder.   It's  similar to mail::ACCOUNT::copyMes‐
39       sagesTo(3x), except that the messages are moved, instead of copied.
40
41       copyTo is a pointer to a mail::folder object, representing  the  folder
42       where  messages  are  moved to.  copyTo may be a folder in another mail
43       account, in which case this function transparently copies the indicated
44       messages  using  mail::ACCOUNT::copyMessagesTo(3x),  then  the original
45       messages are  removed  using  mail::ACCOUNT::removeMessages(3x).   Only
46       SMAP and maildir-based mail accounts can move messages directly between
47       folders; for all other accounts the copy/delete implementation will  be
48       used automatically.
49

RETURN CODES

51       This  method returns true if it succeeds, or false if it fails.  If the
52       method fails, use mail::ACCOUNT::getErrmsg() to read a  brief  descrip‐
53       tion of the error.
54

SEE ALSO

56       mail::ACCOUNT::copyMessagesTo(3x), mail::ACCOUNT::removeMessages(3x).
57
58
59
60                                 10 April 2006mail::ACCOUNT::moveMessagesTo(3x)
Impressum