#include <h/mh.h>
#include <h/signals.h>
#include <setjmp.h>
-#include <signal.h>
#include <fcntl.h>
#include <h/mime.h>
#include <h/tws.h>
(void) fprintf (composition_file, "#%s <>", content_type);
} else {
/* Suppress Content-Id, insert simple Content-Disposition
- and Content-Description with filename. */
+ and Content-Description with filename.
+ The Content-Disposition type needs to be "inline" for
+ MS Outlook and BlackBerry calendar programs to properly
+ handle a text/calendar attachment. */
p = strrchr(file_name, '/');
(void) fprintf (composition_file,
- "#%s; name=\"%s\" <> [%s]{attachment}",
+ "#%s; name=\"%s\" <> [%s]{%s}",
content_type,
(p == (char *)0) ? file_name : p + 1,
- (p == (char *)0) ? file_name : p + 1);
+ (p == (char *)0) ? file_name : p + 1,
+ strcmp ("text/calendar", content_type)
+ ? "attachment" : "inline");
}
break;
(void) fprintf (composition_file, "#%s <>", content_type);
} else {
/* Suppress Content-Id, insert Content-Disposition with
- modification date and Content-Description wtih filename. */
+ modification date and Content-Description wtih filename.
+ The Content-Disposition type needs to be "inline" for
+ MS Outlook and BlackBerry calendar programs to properly
+ handle a text/calendar attachment. */
p = strrchr(file_name, '/');
(void) fprintf (composition_file,
- "#%s; name=\"%s\" <>[%s]{attachment; modification-date=\"%s\"}",
+ "#%s; name=\"%s\" <>[%s]{%s; "
+ "modification-date=\"%s\"}",
content_type,
(p == (char *)0) ? file_name : p + 1,
(p == (char *)0) ? file_name : p + 1,
+ strcmp ("text/calendar", content_type)
+ ? "attachment" : "inline",
dtime (&st.st_mtime, 0));
}
fprintf (stderr, "unable to exec ");
perror (postproc);
_exit (-1);
- break; /* NOT REACHED */
default:
/*
armed_done (int status)
{
longjmp (env, status ? status : NOTOK);
-
- exit (status);
}