Added Content-Description header with the filename of the attachment.
authormarkus schnalke <meillo@marmaro.de>
Mon, 26 Mar 2012 22:13:25 +0000 (00:13 +0200)
committermarkus schnalke <meillo@marmaro.de>
Mon, 26 Mar 2012 22:13:25 +0000 (00:13 +0200)
This seems to be common practice now and gives mhlist something useful
to display.

Merged from nmh. Thanks to David Levine.

man/send.man1
uip/send.c

index 7b368ea..09e3f40 100644 (file)
@@ -65,6 +65,7 @@ A message part header for an attachment might be:
 .PP
 .nf
 Content-Type: text/plain; name="VERSION"; charset="us-ascii"
+Content-Description: VERSION
 Content-Disposition: attachment; filename="VERSION"
 .fi
 .PP
index a735c67..e39ab80 100644 (file)
@@ -630,9 +630,9 @@ make_mime_composition_file_entry(char *file_name)
                adios(NULL, "unable to access file `%s'", file_name);
        }
 
-       fprintf(composition_file, "#%s; name=\"%s\" <>{attachment}",
-               content_type,
-               (!(cp = strrchr(file_name, '/'))) ? file_name : cp + 1);
+       cp = (!(cp = strrchr(file_name, '/'))) ? file_name : cp + 1;
+       fprintf(composition_file, "#%s; name=\"%s\" <> [%s] {attachment}",
+                       content_type, cp, cp);
 
        fprintf(composition_file, " %s\n", file_name);