X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsend.c;h=d87e211fe0be676d9fffbedb3af86179c88ec4cf;hp=2ef1fe765356ea37ed27945b2f4e80c96b68de66;hb=3b91e463fc7a4db9e7b69e2e0f4f7909339beea5;hpb=5fbf37ee68e018998ada61eeab73e035b26834b6 diff --git a/uip/send.c b/uip/send.c index 2ef1fe7..d87e211 100644 --- a/uip/send.c +++ b/uip/send.c @@ -276,7 +276,7 @@ main(int argc, char **argv) push(); } status = 0; - vec[0] = mhbasename(postproc); + vec[0] = "spost"; closefds(3); for (msgnum = 0; msgnum < nfiles; msgnum++) { @@ -485,7 +485,7 @@ attach(char *draft_file_name) fclose(body_file); /* Add a mhbuild MIME composition file line for the body */ - /* charset will be discovered/guessed by buildmimeproc */ + /* charset will be discovered/guessed by mhbuild */ fprintf(composition_file, "#text/plain %s\n", body_file_name); } @@ -512,11 +512,8 @@ attach(char *draft_file_name) } fclose(composition_file); - /* - ** We're ready to roll! Run mhbuild on the composition file. - ** Note that mhbuild is in the context as buildmimeproc. - */ - sprintf(buf, "%s %s", buildmimeproc, composition_file_name); + /* We're ready to roll! */ + sprintf(buf, "mhbuild %s", composition_file_name); if (system(buf) != 0) { /* some problem */ clean_up_temporary_files(); @@ -614,7 +611,7 @@ make_mime_composition_file_entry(char *file_name) /* ** The back-end of the message sending back-end. -** Annotate original message, and call `postproc' to send message. +** Annotate original message, and call `spost' to send message. */ static int sendaux(char **vec, int vecp, char *drft, struct stat *st) @@ -624,7 +621,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) char backup[BUFSIZ]; /* - ** fd collects the output of postproc, and is used for the + ** fd collects the output of spost, and is used for the ** failure notice if we need to send one in alert(). */ fd = pushsw ? tmp_fd() : NOTOK; @@ -653,9 +650,9 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) dup2(fd, fileno(stderr)); close(fd); } - execvp(postproc, vec); + execvp(*vec, vec); fprintf(stderr, "unable to exec "); - perror(postproc); + perror(*vec); _exit(-1); break; /* NOT REACHED */ @@ -667,7 +664,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) } } else { /* - ** If postproc failed, and we have good fd (which + ** If spost failed, and we have good fd (which ** means we pushed), then mail error message ** (and possibly the draft) back to the user. */ @@ -694,7 +691,7 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) /* ** Mail error notification (and possibly a copy of the -** message) back to the user, using the mailproc +** message) back to the user, using mhmail(1). */ static void alert(char *file, int out) @@ -738,10 +735,10 @@ alert(char *file, int out) /* create subject for error notification */ snprintf(buf, sizeof(buf), "send failed on %s", forwsw ? "enclosed draft" : file); - execlp(mailproc, mhbasename(mailproc), getusername(), + execlp("mhmail", "mhmail", getusername(), "-subject", buf, NULL); fprintf(stderr, "unable to exec "); - perror(mailproc); + perror("mhmail"); _exit(-1); default: /* no waiting... */