From: markus schnalke Date: Mon, 26 Mar 2012 22:13:25 +0000 (+0200) Subject: Added Content-Description header with the filename of the attachment. X-Git-Tag: mmh-thesis-end~173 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3e300b97e9a54a3157e37948f8827abbe3eecf05;p=mmh Added Content-Description header with the filename of the attachment. This seems to be common practice now and gives mhlist something useful to display. Merged from nmh. Thanks to David Levine. --- diff --git a/man/send.man1 b/man/send.man1 index 7b368ea..09e3f40 100644 --- a/man/send.man1 +++ b/man/send.man1 @@ -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 diff --git a/uip/send.c b/uip/send.c index a735c67..e39ab80 100644 --- a/uip/send.c +++ b/uip/send.c @@ -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);