diff options
author | mikeh <mikeh@FreeBSD.org> | 2001-06-28 02:40:07 +0000 |
---|---|---|
committer | mikeh <mikeh@FreeBSD.org> | 2001-06-28 02:40:07 +0000 |
commit | e65f95daf358a37f16803c1e0525aac9c021d0b6 (patch) | |
tree | f3260d4fbd6d3b506ac496a52d8c03cb8602bf8a /usr.bin/mail/send.c | |
parent | 47d3082050d220c6f4d161234ff7a3c4bc03b629 (diff) | |
download | FreeBSD-src-e65f95daf358a37f16803c1e0525aac9c021d0b6.zip FreeBSD-src-e65f95daf358a37f16803c1e0525aac9c021d0b6.tar.gz |
Add the -E flag to not send messages that have an empty body. This is
useful for piping cron script error output by mail.
PR: bin/9494
Obtained from: NetBSD
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/mail/send.c')
-rw-r--r-- | usr.bin/mail/send.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/mail/send.c b/usr.bin/mail/send.c index 0e6886c..42dd65e 100644 --- a/usr.bin/mail/send.c +++ b/usr.bin/mail/send.c @@ -323,6 +323,8 @@ mail1(hp, printheaders) } } if (fsize(mtf) == 0) { + if (value("dontsendempty") != NULL) + goto out; if (hp->h_subject == NULL) printf("No message, no subject; hope that's ok\n"); else |