4 .TH MHMAIL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mhmail \- send or read mail
34 .RB [ \-send " | " \-nosend ]
40 is intended as a replacement for the standard Berkeley
45 which is compatible with
47 This program is intended for the use of programs such as
49 which expect to send mail automatically to various
50 users. It is also used by various
52 commands to mail various
53 error notifications. Although
55 can be used interactively,
56 it is recommended that
60 be used instead to send messages.
62 When invoked without arguments, it simply invokes
64 to incorporate new messages from the user's maildrop. When one or more users
65 is specified, a message is read from the standard input and spooled to
71 name of the temporary file as its argument to deliver the message to
77 switch can be used to specify the
78 \*(lqSubject:\*(rq field of the message.
82 switch indicates that the message body is a fully formed message that
85 would do. For example:
89 mhmail u2@example.com -resent < `mhpath cur`
95 will read the message to be sent from the
96 standard input. You can specify the text of the message at the command
100 switch. If the standard input has zero
103 will not send the message and return with status 1. You can use the switch
105 \*(lq\*(rq to force an empty message.
107 Normally, addresses appearing as arguments are put in the \*(lqTo:\*(rq
110 switch is used, all addresses following it, even if there are
111 intervening switches, are placed in the \*(lqcc:\*(rq field.
116 you can specify the \*(lqFrom:\*(rq header of
119 switch is used when sending,
121 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox.
124 will fill\-in the \*(lqSender:\*(rq
130 switch adds a header field with the specified name and body to the
131 message. There need not be a space after the colon that separates the
132 name and body in the argument to this switch. It is usually best to
133 enclose the argument in quotes to protect it from the shell. The
135 switch may be given multiple times to add multiple header fields,
140 mhmail -from sender@example.com \\
141 -header\-field 'MIME-Version:1.0' \\
142 -header\-field 'Content-Type:text/plain; charset=utf-8' \\
143 -header\-field 'Content-Transfer-Encoding:8bit' \\
144 recipient@example.com
148 Note about this example: the
154 headers to be added to the message.
164 to send the message. This allows use of the user's context and aliases.
169 switch attaches the specified file to the message. Use of
177 to handle the attachment. It is usually best to enclose the argument
178 in quotes to protect it from the shell. The
180 switch may be given multiple times to add multiple attachments.
184 option shows the draft file that would be posted/sent on the command's
185 standard output but does not post or send it.
187 provides the default behavior of posting or sending the message. It
188 can be used to disable
190 for example, when using a shell alias.
192 All other switches are passed on to
205 .ta \w'%etcdir%/ExtraBigFileName 'u
206 ^%bindir%/inc~^Program to incorporate maildrop into folder
207 ^%libdir%/post~^Program to deliver a message
208 ^/tmp/mhmail*~^Temporary copy of message
212 dist(1), inc(1), post(8), send(1)
219 enabled by default only with
227 context changes occur. With the
229 switch, the context of