actually send the mail
SCCS-vsn: usr.bin/mail/send.c 1.6
-static char *SccsId = "@(#)send.c 1.5 %G%";
+static char *SccsId = "@(#)send.c 1.6 %G%";
/*
* Send message described by the passed pointer to the
/*
* Send message described by the passed pointer to the
{
register char *cp;
int pid, i, s, p, gotcha;
{
register char *cp;
int pid, i, s, p, gotcha;
+ char **namelist, *deliver;
struct name *to, *np;
FILE *mtf, *postage;
int remote = rflag != NOSTR || rmail;
struct name *to, *np;
FILE *mtf, *postage;
int remote = rflag != NOSTR || rmail;
submit(getpid());
#endif CC
#ifdef DELIVERMAIL
submit(getpid());
#endif CC
#ifdef DELIVERMAIL
- execv(DELIVERMAIL, namelist);
+ if ((deliver = value("sendmail")) == NOSTR)
+ deliver = DELIVERMAIL;
+ execv(deliver, namelist);
#endif DELIVERMAIL
execv(MAIL, namelist);
perror(MAIL);
#endif DELIVERMAIL
execv(MAIL, namelist);
perror(MAIL);