1MAIL::ACCOUNT::ADDME(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::ADDME(3x)
2
3
4

NAME

6       mail::ACCOUNT::addMessage - Add a message to a folder
7

SYNOPSIS

9       #include <libmail/sync.H>
10
11       #include <libmail/addmessage.H>
12
13       mail::ACCOUNT *mail;
14
15       class myAddMessagePull : public mail::addMessagePull {
16
17       public:
18           std::string getMessageContents();
19       };
20
21       time_t messageDate;
22       mail::messageInfo newMessageInfo;
23       myAddMessagePull message;
24
25           message.messageDate=messageDate;
26           message.newMessageInfo=newMessageInfo;
27
28       bool ok=mail->addMessage(const mail::folder *folder, message);
29
30                                std::string errmsg=mail->getErrmsg();
31

USAGE

33       This method inserts a message into a folder.  folder specifies the
34       folder where the message is added to, which may or may not be the
35       currently open folder.
36
37       message´s getMessageContents specifies the contents of the message,
38       which should be a valid, MIME-formatted message.  getMessageContents
39       does not have to return the entire contents of the message at once.
40       addMessage calls getMessageContents repeatedly.  getMessageContents
41       should return the next portion of the message with each call.
42       getMessageContents should return an empty string, after providing the
43       entire message contents are provided.  getMessageContents will be
44       called repeatedly until it returns an empty string.
45
46       The application may set the following mail::addMessagePull fields
47       before invoking this method. If not initialized, the following fields
48       will be set to their default values.
49
50       messageDate
51           The message´s arrival timestamp, which is retrieved by
52           mail::ACCOUNT::getMessageEnvelope(3x), which places it in the
53           arrivalDate field.
54
55               Note
56               This timestamp does not necessarily have to be the same as the
57               timestamp in the message´s Date: header.
58
59       messageInfo
60           The message flags, as returned by
61           mail::ACCOUNT::getFolderIndexInfo(3x).
62
63               Note
64               The contents of uid, the message´s unique ID, are ignored, only
65               the message flags in messageInfo are read. The message gets
66               automatically assigned a new unique ID when it gets added to
67               the folder.
68

RETURN CODES

70       This method returns true if it succeeds, or false if it fails. If the
71       method fails, use mail::ACCOUNT::getErrmsg() to read a brief
72       description of the error.
73

SEE ALSO

75       mail::ACCOUNT::checkNewMail(3x).
76
77
78
79[FIXME: source]                   05/08/2010          MAIL::ACCOUNT::ADDME(3x)
Impressum