Implement mailx's askbcc option.

This commit is contained in:
jtc 1993-08-27 20:31:51 +00:00
parent aae6837578
commit 10a20d067c
2 changed files with 14 additions and 6 deletions
usr.bin/mail

@ -30,7 +30,7 @@
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" from: @(#)mail.1 6.19 (Berkeley) 7/27/91 .\" from: @(#)mail.1 6.19 (Berkeley) 7/27/91
.\" $Id: mail.1,v 1.2 1993/08/01 07:31:08 mycroft Exp $ .\" $Id: mail.1,v 1.3 1993/08/27 20:31:51 jtc Exp $
.\" .\"
.Dd July 27, 1991 .Dd July 27, 1991
.Dt MAIL 1 .Dt MAIL 1
@ -797,7 +797,7 @@ Causes messages saved in
to be appended to the end rather than prepended. to be appended to the end rather than prepended.
This should always be set (perhaps in This should always be set (perhaps in
.Pa /usr/share/misc/Mail.rc ) . .Pa /usr/share/misc/Mail.rc ) .
.It Ar ask .It Ar ask , asksub
Causes Causes
.Nm mail .Nm mail
to prompt you for the subject of each message you send. to prompt you for the subject of each message you send.
@ -808,6 +808,11 @@ Causes you to be prompted for additional carbon copy recipients at the
end of each message. end of each message.
Responding with a newline indicates your Responding with a newline indicates your
satisfaction with the current list. satisfaction with the current list.
.It Ar askbcc
Causes you to be prompted for additional blind carbon copy recipients at the
end of each message.
Responding with a newline indicates your
satisfaction with the current list.
.It Ar autoprint .It Ar autoprint
Causes the Causes the
.Ic delete .Ic delete

@ -33,7 +33,7 @@
#ifndef lint #ifndef lint
/*static char sccsid[] = "from: @(#)send.c 5.23 (Berkeley) 2/9/91";*/ /*static char sccsid[] = "from: @(#)send.c 5.23 (Berkeley) 2/9/91";*/
static char rcsid[] = "$Id: send.c,v 1.2 1993/08/01 18:12:57 mycroft Exp $"; static char rcsid[] = "$Id: send.c,v 1.3 1993/08/27 20:31:52 jtc Exp $";
#endif /* not lint */ #endif /* not lint */
#include "rcv.h" #include "rcv.h"
@ -302,9 +302,12 @@ mail1(hp, printheaders)
if ((mtf = collect(hp, printheaders)) == NULL) if ((mtf = collect(hp, printheaders)) == NULL)
return; return;
if (value("interactive") != NOSTR) if (value("interactive") != NOSTR)
if (value("askcc") != NOSTR || value("askbcc") != NOSTR) {
if (value("askcc") != NOSTR) if (value("askcc") != NOSTR)
grabh(hp, GCC); grabh(hp, GCC);
else { if (value("askbcc") != NOSTR)
grabh(hp, GBCC);
} else {
printf("EOT\n"); printf("EOT\n");
(void) fflush(stdout); (void) fflush(stdout);
} }