- /* Suppress Content-Id, insert Content-Disposition with
- modification date. */
- (void) fprintf (composition_file,
- "#%s <>{attachment; modification-date=\"%s\"}",
- content_type,
- dtime (&st.st_mtim, 0));
+ if (stringdex (m_maildir(invo_name), file_name) == 0) {
+ /* Content had been placed by send into a temp file.
+ Don't generate Content-Disposition header, because
+ it confuses Microsoft Outlook, Build 10.0.6626, at
+ least. */
+ (void) fprintf (composition_file, "#%s <>", content_type);
+ } else {
+ /* Suppress Content-Id, insert Content-Disposition with
+ modification date and Content-Description wtih filename. */
+ p = strrchr(file_name, '/');
+ (void) fprintf (composition_file,
+ "#%s; name=\"%s\" <>[%s]{attachment; modification-date=\"%s\"}",
+ content_type,
+ (p == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1,
+ dtime (&st.st_mtime, 0));
+ }