]> diplodocus.org Git - nmh/blobdiff - uip/mhbuildsbr.c
Switch to the (correct) casting of char to unsigned char for is*() macros.
[nmh] / uip / mhbuildsbr.c
index 8d3a76dfb17506450a56c7f8cb51becb57cb18b7..79268399261973f681cb570a485d77c94244078d 100644 (file)
@@ -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.