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

NAME

8       mail::ACCOUNT::addMessage - Add a message to a folder
9

SYNOPSIS

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

USAGE

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

RETURN CODES

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

SEE ALSO

77       mail::ACCOUNT::checkNewMail(3x).
78

AUTHOR

80       Sam Varshavchik
81
82
83
84ConeĀ©                             08/25/2016          MAIL::ACCOUNT::ADDME(3x)
Impressum