-
-/*
- * viamail.c -- send multiple files in a MIME message
+/* viamail.c -- send multiple files in a MIME message
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
#include <h/mh.h>
#include <fcntl.h>
-#include <h/signals.h>
#include <h/md5.h>
#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
+#include <h/utils.h>
+#include "sbr/m_mktemp.h"
+#include "sbr/base64.h"
#define VIAMAIL_SWITCHES \
X("to mailpath", 0, TOSW) \
char *cp, buf[BUFSIZ];
char **argp, **arguments;
- if (nmh_init(argv[0], 1)) { return 1; }
+ if (nmh_init(argv[0], 2)) { return 1; }
arguments = getarguments (invo_name, argc, argv, 0);
argp = arguments;
if (fflush (fp))
adios (tmpfil, "error writing to");
- writeBase64aux (stdin, fp);
+ writeBase64aux (stdin, fp, 0);
if (fflush (fp))
adios (tmpfil, "error writing to");
vec[vecp++] = cp;
}
- switch (sendsbr (vec, vecp, program, tmpfil, &st, 0)) {
+ switch (sendsbr (vec, vecp, program, tmpfil, &st, 0, NULL)) {
case DONE:
case NOTOK:
status++;