Name

mail::account::getFolderIndexInfo — Return message status

Synopsis




#include <libmail/mail.H>


mail::account *account;

mail::messageInfo msgInfo=account->getFolderIndexInfo( size_t messageNum);
 

USAGE

mail::account::getFolderIndexInfo returns a structure that contains a message's unique identifier, and the message's current status flags. messageNum must be between zero and one less than the return code from mail::account::getFolderIndexSize(3x).

Return Codes

This function returns an object with the following fields:

std::string uid

A unique ID that's assigned to each message in a folder. Applications should consider this unique ID as a completely opaque string, with no particular interpretation. The only assumption that applications may make is that no two messages will ever have the same uid in the same folder. A message copied to another folder will receive a different unique ID in the destination folder (the copy in the original folder is not affected).

bool draft

This is a draft message.

bool replied

A reply was previously sent to this message.

bool marked

This message is marked for further processing.

bool deleted

This message is marked for deletion.

bool unread

The contents of this message have not been read.

bool recent

This is the first time the folder was opened with this message in the folder.

Note

This message flag is considered obsolete, and should only be used by IMAP-based clients that absolutely need this flag. Applications that absolutely require this flag should be evaluated for correctness, since the IMAP specification indicates that this flag's setting is not defined in situations where the same mail folder is opened by multiple applications at the same time. Since this is nearly always the case, it seems that this flag's usability is rather limited. For this reason, the recent flag was not reimplemented in SMAP, and will not be set for accounts that are accessed via SMAP.

Note

Not all types of mail accounts support every message status flag. Unsupported message status flags will be automatically emulated, where possible. Specifically, POP3 mail accounts do not have a concept of message status flags at all. Each time a POP3 mail account is opened, the status of all messages in the POP3 account will be reset to the default status (unread message, no other flags set).