X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/55f65ae2d3baf60396d3359db952460939de03ca..c05412e6b606d064d54c6d2a13f511cdc34d71f1:/uip/mhbuildsbr.c diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 8d3a76df..79268399 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -137,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); @@ -227,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.