]> diplodocus.org Git - nmh/blobdiff - uip/viamail.c
Reworked attach to add charset to Content-Type string for
[nmh] / uip / viamail.c
index 37514d5af39125025c8fa78fbeea7a9e8217d6fe..7c81079da9958735a31835b2aff2218bcc9ceb36 100644 (file)
@@ -11,8 +11,6 @@
 #include <fcntl.h>
 #include <h/signals.h>
 #include <h/md5.h>
-#include <errno.h>
-#include <signal.h>
 #include <h/mts.h>
 #include <h/tws.h>
 #include <h/mime.h>
@@ -189,6 +187,7 @@ via_mail (char *mailsw, char *subjsw, char *parmsw, char *descsw,
     struct stat st;
     FILE *fp;
     char *tfile = NULL;
+    char *cp;
 
     umask (~m_gmprot ());
 
@@ -245,6 +244,12 @@ via_mail (char *mailsw, char *subjsw, char *parmsw, char *descsw,
     if (verbsw)
        vec[vecp++] = "-verbose";
 
+    if ((cp = context_find ("credentials"))) {
+       /* post doesn't read context so need to pass credentials. */
+       vec[vecp++] = "-credentials";
+       vec[vecp++] = cp;
+    }
+
     switch (sendsbr (vec, vecp, program, tmpfil, &st, 0, (char *)0, 0)) {
        case DONE:
        case NOTOK: