Use trim() to strip whitespace from the end of header fields
[mmh] / uip / send.c
index e63074c..bf37600 100644 (file)
@@ -425,9 +425,7 @@ attach(char *draft_file_name)
        while (get_line() != EOF && *field && *field != '-') {
                if (strncasecmp(field, attach_hdr, length) == 0 &&
                                field[length] == ':') {
-                       for (p = field+length+1; *p==' ' || *p=='\t'; p++) {
-                               continue;
-                       }
+                       p = trim(field+length+1);
                        if (*p == '+') {
                                /* forwarded message */
                                fprintf(composition_file, "#forw [forwarded message(s)] %s\n", p);