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
108 field. At least one such address is required when sending a message,
109 i.e., if any other switches are supplied. If the
111 switch is used, all addresses following it, even if there are
112 intervening switches, are placed in the \*(lqcc:\*(rq field.
117 you can specify the \*(lqFrom:\*(rq header of
120 switch is used when sending,
122 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox,
129 will fill\-in the \*(lqSender:\*(rq
135 switch adds a header field with the specified name and body to the
136 message. There need not be a space after the colon that separates the
137 name and body in the argument to this switch. It is usually best to
138 enclose the argument in quotes to protect it from the shell. The
140 switch may be given multiple times to add multiple header fields,
145 mhmail -from sender@example.com \\
146 -header\-field 'MIME-Version:1.0' \\
147 -header\-field 'Content-Type:text/plain; charset=utf-8' \\
148 -header\-field 'Content-Transfer-Encoding:8bit' \\
149 recipient@example.com
153 Note about this example: the
159 headers to be added to the message.
169 to send the message. This allows use of the user's context and aliases.
174 switch attaches the specified file to the message. Use of
182 to handle the attachment. It is usually best to enclose the argument
183 in quotes to protect it from the shell. The
185 switch may be given multiple times to add multiple attachments.
189 option shows the draft file that would be posted/sent on the command's
190 standard output but does not post or send it.
192 provides the default behavior of posting or sending the message. It
193 can be used to disable
195 for example, when using a shell alias.
197 All other switches are passed on to
210 .ta \w'%etcdir%/ExtraBigFileName 'u
211 ^%bindir%/inc~^Program to incorporate maildrop into folder
212 ^%libdir%/post~^Program to deliver a message
213 ^/tmp/mhmail*~^Temporary copy of message
217 dist(1), inc(1), mh-format(5), post(8), send(1)
221 .RB ` \-from "' defaults to sender's local mailbox (localmbox)"
222 .RB ` \-profile "' is enabled by default only with " \-attach
231 context changes occur. With the
233 switch, the context of