summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mail/main.c')
-rw-r--r--usr.bin/mail/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c
index d6499bb..7c66fa4 100644
--- a/usr.bin/mail/main.c
+++ b/usr.bin/mail/main.c
@@ -61,8 +61,8 @@ main(argc, argv)
{
register int i;
struct name *to, *cc, *bcc, *smopts;
- char *subject;
- char *ef;
+ char *subject, *replyto;
+ char *ef, *cp;
char nosrc = 0;
void hdrstop();
sig_t prevint;
@@ -90,6 +90,7 @@ main(argc, argv)
bcc = NIL;
smopts = NIL;
subject = NOSTR;
+ replyto = NOSTR;
while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != -1) {
switch (i) {
case 'T':
@@ -220,6 +221,8 @@ Usage: mail [-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
@@ -227,7 +230,7 @@ Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...\n\
*/
load(expand("~/.mailrc"));
if (!rcvmode) {
- mail(to, cc, bcc, smopts, subject);
+ mail(to, cc, bcc, smopts, subject, replyto);
/*
* why wait?
*/
OpenPOWER on IntegriCloud