]> git.marmaro.de Git - mmh/blobdiff - uip/send.c
Use trim() to strip whitespace from the end of header fields
[mmh] / uip / send.c
index e63074caac7cefcc357a0474a7fab20bf487563f..bf37600428734ca705075c1ea9dc71cc0e5c513d 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] == ':') {
        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);
                        if (*p == '+') {
                                /* forwarded message */
                                fprintf(composition_file, "#forw [forwarded message(s)] %s\n", p);