X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/61ccf1dbeea93978803303d2cd43efa5da2cc7d1..c05412e6b606d064d54c6d2a13f511cdc34d71f1:/uip/mhbuildsbr.c diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 07358cd3..79268399 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -138,6 +137,7 @@ build_mime (char *infile, int directives) struct part **pp; CT ct; FILE *in; + HF hp; m_getfld_state_t gstate = 0; directive_init(directives); @@ -228,6 +228,17 @@ finish_field: } m_getfld_state_destroy (&gstate); + /* + * Iterate through the list of headers and call the function to MIME-ify + * them if required. + */ + + for (hp = ct->c_first_hf; hp != NULL; hp = hp->next) { + if (encode_rfc2047(hp->name, &hp->value, CE_UNKNOWN, NULL)) { + adios(NULL, "Unable to encode header \"%s\"", hp->name); + } + } + /* * Now add the MIME-Version header field * to the list of header fields.