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

## Name

mail::ACCOUNT::getMessageStructure — Return message MIME structure

## Synopsis

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

`bool ok=mail->getMessageStructure(` | const std::vector<size_t> &msgList,
| std::vector<mail::mimestruct> &structures`)`;

std::string errmsg=mail->getErrmsg();

`mail::mimestruct myMimeStruct=mail->getMessageStructure(` | size_t messageNum`)`;

## USAGE

`msgList` specifies a list of messages. Messages are numbered starting with message #0 and up to one less than mail::ACCOUNT::getFolderIndexSize(3x) (when `mail::account::getFolderIndexSize` returns 6, the messages are numbered 0 through 5). Only the messages that appear in `msgList` are processed by this request. When a message is removed from the folder, by mail::ACCOUNT::updateFolderIndexInfo(3x), the following messages are renumbered accordingly.

### Note

Most mail servers allow multiple applications to open the same folder. Therefore, changes to the folder's contents can occur at any time. Before making this request, the application should use mail::ACCOUNT::checkNewMail(3x) to verify that no unexpected changes have been made to the folder's contents.

This function returns the MIME structure information of each message specified by `msgList`. This function initializes the `structures` array to the same size as `msgList`, with each array member containing the MIME structure for the corresponding message in `msgList`.

## Return Codes

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.

The second version of `mail::ACCOUNT::getMessageStructure` returns the MIME structure of a single message, ignoring any error condition (a failure results in the returned mail::mimestruct object being completely empty).

## SEE ALSO

mail::mimestruct(3x), mail::ACCOUNT::getFolderIndexInfo(3x), mail::ACCOUNT::getFolderIndexSize(3x).

Prev | Up | Next
mail::ACCOUNT::getMessageEnvelope | Home | ToC | mail::ACCOUNT::getMyRights