On Wed, 2010-02-10 at 14:19 -0200, Alex Baule wrote:> example, I have the header:
> X-ThereisMy: yes
>
> How can I get this value inside a plugin ?
>
> There is something like getHeaderVar("X-ThereisMy") ?
If you haven't found out yet, one of these should help:
/* Get value for single header field, or NULL if header wasn't found.
Returns 1 if header was found, 0 if not, -1 if error. */
int mail_get_first_header(struct mail *mail, const char *field,
const char **value_r);
/* Like mail_get_first_header(), but decode MIME encoded words to UTF-8.
Also multiline headers are returned unfolded. */
int mail_get_first_header_utf8(struct mail *mail, const char *field,
const char **value_r);
/* Return a NULL-terminated list of values for each found field. */
int mail_get_headers(struct mail *mail, const char *field,
const char *const **value_r);
/* Like mail_get_headers(), but decode MIME encoded words to UTF-8.
Also multiline headers are returned unfolded. */
int mail_get_headers_utf8(struct mail *mail, const char *field,
const char *const **value_r);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20100218/59324d4f/attachment-0002.bin>