Accessing and manipulating a message's envelope | |
| int | mm_envelope_getheaders (MM_CTX *ctx, char **result, size_t *length) |
| int | mm_envelope_setheader (MM_CTX *ctx, const char *name, const char *fmt,...) |
| int | mm_envelope_getrecipients (MM_CTX *ctx, char **result, size_t *length) |
| int mm_envelope_getheaders | ( | MM_CTX * | ctx, | |
| char ** | result, | |||
| size_t * | length | |||
| ) |
Gets an ASCII representation of all envelope headers
| ctx | A valid MiniMIME context | |
| result | Where to store the resulting ASCII headers | |
| length | Where to store the length of the result |
Since the memory needed to store the result is allocated dynamically, one should take care of freeing it again when it's not needed anymore. If an error occurs, *result will be set to NULL, *length will be set to zero and mm_errno will be set to a reasonable value.
| int mm_envelope_getrecipients | ( | MM_CTX * | ctx, | |
| char ** | result, | |||
| size_t * | length | |||
| ) |
Gets the list of recipients for a MIME message
| ctx | A valid MiniMIME context | |
| result | Where to store the result | |
| length | Where to store the length of the result |
One should take care to free() the result once it's not needed anymore.
| int mm_envelope_setheader | ( | MM_CTX * | ctx, | |
| const char * | name, | |||
| const char * | fmt, | |||
| ... | ||||
| ) |
Sets a header field in the envelope
| ctx | A valid MiniMIME context | |
| name | The name of the header field to set | |
| fmt | A format string specifying the value of the header field |
1.5.1