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

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" 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
.Dt MAIL 1
@ -797,7 +797,7 @@ Causes messages saved in
to be appended to the end rather than prepended.
This should always be set (perhaps in
.Pa /usr/share/misc/Mail.rc ) .
.It Ar ask
.It Ar ask , asksub
Causes
.Nm mail
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.
Responding with a newline indicates your
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
Causes the
.Ic delete

View File

@ -33,7 +33,7 @@
#ifndef lint
/*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 */
#include "rcv.h"
@ -302,9 +302,12 @@ mail1(hp, printheaders)
if ((mtf = collect(hp, printheaders)) == NULL)
return;
if (value("interactive") != NOSTR)
if (value("askcc") != NOSTR || value("askbcc") != NOSTR) {
if (value("askcc") != NOSTR)
grabh(hp, GCC);
else {
if (value("askbcc") != NOSTR)
grabh(hp, GBCC);
} else {
printf("EOT\n");
(void) fflush(stdout);
}