Go to the first, previous, next, last section, table of contents.


Message

#include <mailutils/message.h>
/* Prefix message_ is reserve */

The message_t object is a convenient way to manipulate messages. It encapsulates the envelope_t, the header_t and the body_t.

    mailbox_t
    __________                   message_t
   (message[1])        +------>+-----------------------+
    ----------         |       |  envelope_t           |
   (message[2])        |       |-----------------------|
    ----------         |       |  header_t             |
   (message[3])--------+       |-----------------------|
    ----------                 |  body_t               |
   (message[n])                |-----------------------|
    ----------                 |  attribute_t          |
                               |-----------------------|
                               |  stream_t             |
                               +-----------------------+

Function: void message_create (message_t *msg, void *owner)

Function: void message_destroy (message_t *msg, void *owner)
The resources allocate for msg are freed.

Function: int message_get_header (message_t msg, header_t *pheader)
Retrieve msg header.

Function: int message_set_header (message_t msg, header_t header, void *owner)

Function: int message_get_body (message_t msg, body_t *pbody)

Function: int message_set_body (message_t msg, body_t body, void *owner)

Function: int message_is_multipart (message_t msg)
Return non-zero value if message is multi-part.

Function: int message_get_num_parts (message_t msg, size_t *nparts)

Function: int message_get_part (message_t msg, size_t part, message_t *msg)

Function: int message_get_stream (message_t msg, stream_t *pstream)

Function: int message_set_stream (message_t msg, stream_t stream,void *owner )

Function: int message_get_attribute (message_t msg, attribute_t *pattribute)

Function: int message_set_attribute (message_t msg, attribute_t attribute, void *owner)

Function: int message_get_envelope (message_t msg, envelope_t *penvelope)

Function: int message_set_envelope (message_t msg, envelope_t envelope, void *owner)

Function: int message_get_uid (message_t msg, size_t *uid)

Function: int message_get_uidl (message_t msg, char *buffer, size_t buflen, size_t *pwriten)

Function: int message_set_uidl (message_t msg, int (*_get_uidl)(message_t, char *, size_t, size_t *), void *owner)

Function: int message_get_observable (message_t msg, observable_t *observable)

Function: int message_create_attachment (const char *content_type, const char *encoding, const char *filename, message_t *newmsg)

Function: int message_save_attachment (message_t msg, const char *filename, void **data)

Function: int message_encapsulate (message_t msg, message_t *newmsg, void **data)

Function: int message_unencapsulate (message_t msg, message_t *newmsg, void **data);


Go to the first, previous, next, last section, table of contents.