Respect REPLYTO in mailrc.

PR:		bin/8322
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
MFC after:	2 weeks
This commit is contained in:
mikeh 2001-06-14 01:08:30 +00:00
parent 2f9709c0f1
commit 3979a82a11
4 changed files with 8 additions and 10 deletions

View File

@ -260,8 +260,7 @@ dorespond(msgvec)
head.h_cc = NULL;
head.h_bcc = NULL;
head.h_smopts = NULL;
if ((head.h_replyto = getenv("REPLYTO")) == NULL)
head.h_replyto = NULL;
head.h_replyto = value("REPLYTO");
head.h_inreplyto = skin(hfield("message-id", mp));
mail1(&head, 1);
return (0);
@ -626,8 +625,7 @@ doRespond(msgvec)
head.h_cc = NULL;
head.h_bcc = NULL;
head.h_smopts = NULL;
if ((head.h_replyto = getenv("REPLYTO")) == NULL)
head.h_replyto = NULL;
head.h_replyto = value("REPLYTO");
head.h_inreplyto = mid;
mail1(&head, 1);
return (0);

View File

@ -821,6 +821,9 @@ commands.
Options may be either binary, in which case it is only
significant to see whether they are set or not; or string, in which
case the actual value is of interest.
If an option is not set,
.Nm
will look for an environment variable of the same name.
The binary options include the following:
.Bl -tag -width append
.It Ar append

View File

@ -93,7 +93,6 @@ main(argc, argv)
bcc = NULL;
smopts = NULL;
subject = NULL;
replyto = NULL;
while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != -1) {
switch (i) {
case 'T':
@ -219,14 +218,13 @@ Usage: %s [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...\n\
if (*s != '\0')
load(s);
}
if ((cp = getenv("REPLYTO")) != NULL)
replyto = cp;
/*
* Expand returns a savestr, but load only uses the file name
* for fopen, so it's safe to do this.
*/
load(expand("~/.mailrc"));
replyto = value("REPLYTO");
if (!rcvmode) {
mail(to, cc, bcc, smopts, subject, replyto);
/*

View File

@ -287,8 +287,7 @@ sendmail(str)
head.h_cc = NULL;
head.h_bcc = NULL;
head.h_smopts = NULL;
if ((head.h_replyto = getenv("REPLYTO")) == NULL)
head.h_replyto = NULL;
head.h_replyto = value("REPLYTO");
head.h_inreplyto = NULL;
mail1(&head, 0);
return (0);