mail::ACCOUNT::getFolderIndexInfo
Prev | mail::ACCOUNT Synchronous API reference | Next

## Name

mail::ACCOUNT::getFolderIndexInfo — Return message status

## Synopsis

#include <libmail/sync.H>
mail::ACCOUNT *mail;

`mail::messageInfo msgInfo=mail->fsfuncgetFolderIndexSize(` | 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 AND CALLBACKS

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).

## SEE ALSO

mail::ACCOUNT::getFolderIndexSize(3x), mail::ACCOUNT::getFolderKeywordInfo(3x), mail::ACCOUNT::getMessageEnvelope(3x), mail::ACCOUNT::getMessageStructure(3x), mail::ACCOUNT::getMyRights(3x).

Prev | Up | Next
mail::ACCOUNT::delRights | Home | ToC | mail::ACCOUNT::getFolderIndexSize