#include <libmail/sync.H>
#include <libmail/addmessage.H>
mail::ACCOUNT *mail;
class myAddMessagePull : public mail::addMessagePull {
public:
std::string getMessageContents();
};
time_t messageDate;
mail::messageInfo newMessageInfo;
myAddMessagePull message;
message.messageDate=messageDate;
message.newMessageInfo=newMessageInfo;
std::string errmsg=mail->getErrmsg();
This method inserts a message into a folder. folder specifies the folder where the message is added to, which may or may not be the currently open folder.
message's getMessageContents specifies the contents of the message, which should be a valid, MIME-formatted message. getMessageContents does not have to return the entire contents of the message at once. addMessage calls getMessageContents repeatedly. getMessageContents should return the next portion of the message with each call. getMessageContents should return an empty string, after providing the entire message contents are provided. getMessageContents will be called repeatedly until it returns an empty string.
The application may set the following
mail::addMessagePull
fields before invoking this
method.
If not initialized, the following fields will be set to their default
values.
The message's arrival timestamp, which is retrieved
by
mail::ACCOUNT::getMessageEnvelope(3x),
which places it in the arrivalDate
field.
NOTE: | This timestamp does not necessarily have to be the same as the timestamp in the message's Date: header. |
The message flags, as returned by mail::ACCOUNT::getFolderIndexInfo(3x).
NOTE: | The contents of |
This method returns true if it succeeds, or
false if it fails.
If the method fails, use
mail::ACCOUNT::getErrmsg()
to read a brief
description of the error.
<<< Previous | Home | Next >>> |
mail::ACCOUNT Synchronous API reference | Up | mail::ACCOUNT::checkNewMail |