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

NAME

6       mail::ACCOUNT::copyMessagesTo - Copy 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->copyMessagesTo   (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::copyMessagesTo copies  messages  in  the  currently-open
38       folder  to  another  folder.   copyTo  is  a  pointer to a mail::folder
39       object, representing the folder  where  messages  are  copied  to.   If
40       account  is  an  IMAP  account and copyTo is another folder in the same
41       account, then the messages are quickly copied by the IMAP server.  Oth‐
42       erwise each message is individually downloaded and copied to the copyTo
43       folder.
44

RETURN CODES

46       This method returns true if it succeeds, or false if it fails.  If  the
47       method  fails,  use mail::ACCOUNT::getErrmsg() to read a brief descrip‐
48       tion of the error.
49

SEE ALSO

51       mail::ACCOUNT::moveMessagesTo(3x), mail::ACCOUNT::searchMessages(3x).
52
53
54
55                                 10 April 2006mail::ACCOUNT::copyMessagesTo(3x)
Impressum