libEtPan! implements Internet Message parser. Currently, format is RFC 2822. This module also allows to generate messages.
Warning |
All allocation functions will take as argument allocated data and will store these data in the structure they will allocate. Data should be persistant during all the use of the structure and will be freed by the free function of the structure allocation functions will return NULL on failure functions returning integer will be returning one of the following error code: MAILIMF_NO_ERROR, MAILIMF_ERROR_PARSE, MAILIMF_ERROR_MEMORY, MAILIMF_ERROR_INVAL, or MAILIMF_ERROR_FILE. |
You will need this module when you want to parse headers of messages or when you want to build message headers conformant to standards.
You will use one of the four following functions, depending on your needs :
mailimf_envelope_and_optional_fields_parse (the Section called mailimf_envelope_and_optional_fields_parse),
mailimf_envelope_fields_parse (the Section called mailimf_envelope_fields_parse),
mailimf_optional_fields_parse (the Section called mailimf_optional_fields_parse),
mailimf_fields_parse (the Section called mailimf_fields_parse).
Build your message headers, then use mailimf_fields_write (the Section called Header fields) to render the headers.