Commit 64ba305f 64ba305f21578e69832ab95153334480bfcaaecf by Sergey Poznyakoff

(Mail Variables): Document nullbody and nullbodymsg

1 parent 751c11c2
...@@ -2099,6 +2099,41 @@ be included in the group. ...@@ -2099,6 +2099,41 @@ be included in the group.
2099 2099
2100 Setting this variable does not affect the operation mode of the program. 2100 Setting this variable does not affect the operation mode of the program.
2101 2101
2102 @item nullbody
2103 @* Type: Boolean
2104 @* Default: True
2105 @vrindex nullbody, mail variable
2106
2107 Controls whether @command{mail} accepts messages with an empty
2108 body. The default value, @code{true}, means such messages are sent,
2109 and a warning (traditionally saying @samp{Null message body; hope
2110 that's ok}) is displayed. The text of the warning can be set using
2111 @code{nullbodymsg} variable (see below).
2112
2113 If @code{nullbody} is unset, @command{mail} will silently ignore such
2114 messages. This can be useful in @file{crontab} files, to avoid sending
2115 mails when nothing important happens. For example, the @file{crontab}
2116 entry below will send mail only if the utility @command{some-prog}
2117 outputs something on its standard output or error:
2118
2119 @smallexample
2120 @group
2121 */5 * * * * some-prog 2>&1 | \
2122 /bin/mail -E'set nonullbody' -s 'Periodic synchronization'
2123 @end group
2124 @end smallexample
2125
2126 @item nullbodymsg
2127 @*Type: String
2128 @*Default: Null message body; hope that's ok
2129 @vrindex nullbodymsg
2130
2131 Keeps the text of the warning, displayed by @command{mail} before
2132 sending an empty message. When available, the translation of
2133 this text, in accordance with the current locale, is displayed.
2134
2135 Unsetting this variable disables the warning.
2136
2102 @item outfolder 2137 @item outfolder
2103 @*Type: String. 2138 @*Type: String.
2104 @*Default: Unset. 2139 @*Default: Unset.
......