Add support for "to", "cc", "from", and "fcc" components via command-line
[mmh] / uip / send.c
index ad1cf39..62bf60a 100644 (file)
@@ -168,6 +168,16 @@ main (int argc, char **argv)
     vec[vecp++] = "-library";
     vec[vecp++] = getcpy (m_maildir (""));
 
+    if ((cp = context_find ("fileproc"))) {
+      vec[vecp++] = "-fileproc";
+      vec[vecp++] = cp;
+    }
+
+    if ((cp = context_find ("mhlproc"))) {
+      vec[vecp++] = "-mhlproc";
+      vec[vecp++] = cp;
+    }
+
     while ((cp = *argp++)) {
        if (*cp == '-') {
            switch (smatch (++cp, switches)) {
@@ -416,6 +426,7 @@ go_to_it:
            && altmsg) {
        vec[vecp++] = "-dist";
        distfile = getcpy (m_mktemp2 (altmsg, invo_name, NULL, NULL));
+       unlink(distfile);
        if (link (altmsg, distfile) == NOTOK) {
            if (errno != EXDEV
 #ifdef EISREMOTE