X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fsendsbr.c;h=d866ebc925b13a75dfdd513894b5d1f7b52cf426;hb=783f1bcf7d7429121a97eb0117bf444c1a59a28e;hp=f0c84f5e977bb1ae1c2c4e5f3ad57cb9d4921667;hpb=f475d48680eb8bb0b6543efab9057eba2773666e;p=mmh diff --git a/uip/sendsbr.c b/uip/sendsbr.c index f0c84f5..d866ebc 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -16,16 +16,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include int debugsw = 0; /* global */ int forwsw = 1; @@ -198,6 +192,7 @@ attach(char *attachment_header_field_name, char *draft_file_name, int has_body; /* draft has a message body */ int length; /* length of attachment header field name */ char *p; /* miscellaneous string pointer */ + FILE *fp; /* pointer for mhn.defaults */ /* * Open up the draft file. @@ -307,6 +302,11 @@ attach(char *attachment_header_field_name, char *draft_file_name, * that specify attachments. Add a mhbuild MIME composition file for each. */ + if ((fp = fopen (p = etcpath ("mhn.defaults"), "r"))) { + readconfig ((struct node **) NULL, fp, p, 0); + fclose(fp); + } + rewind(draft_file); while (get_line() != EOF && *field != '\0' && *field != '-') { @@ -675,7 +675,7 @@ splitmsg (char **vec, int vecp, char *drft, struct stat *st, int delay) time (&clock); snprintf (msgid, sizeof(msgid), "<%d.%ld@%s>", - (int) getpid(), (long) clock, LocalName()); + (int) getpid(), (long) clock, LocalName(1)); fseek (in, start, SEEK_SET); for (partno = 1; partno <= nparts; partno++) {