[Dovecot] Get some headers Variables
Hello Everyone again !!
I'm putting more functions in my plugin, and would need to access a value of one variable that is going to put in the header, how can I get this value by dovecot?
example, I have the header: X-ThereisMy: yes
How can I get this value inside a plugin ?
There is something like getHeaderVar("X-ThereisMy") ?
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);
participants (2)
-
Alex Baule
-
Timo Sirainen