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 value to the
140 in RFC 2822, but that's too easily confused with the message body.)
141 There need not be a space after the colon that separates the
142 name and value in the argument to this switch. It is usually best to
143 enclose the argument in quotes to protect it from the shell. The
145 switch may be given multiple times to add multiple header fields,
150 mhmail -from sender@example.com \\
151 -headerfield 'MIME-Version:1.0' \\
152 -headerfield 'Content-Type:text/plain; charset=utf-8' \\
153 -headerfield 'Content-Transfer-Encoding:8bit' \\
154 recipient@example.com
158 Note about this example: the
164 headers to be added to the message.
174 to send the message. This allows use of the user's context and aliases.
179 switch attaches the specified file to the message. Use of
187 to handle the attachment. It is usually best to enclose the argument
188 in quotes to protect it from the shell. The
190 switch may be given multiple times to add multiple attachments.
194 option shows the draft file that would be posted/sent on the command's
195 standard output but does not post or send it.
197 provides the default behavior of posting or sending the message. It
198 can be used to disable
200 for example, when using a shell alias.
202 All other switches are passed on to
215 .ta \w'%etcdir%/ExtraBigFileName 'u
216 ^%bindir%/inc~^Program to incorporate maildrop into folder
217 ^%libdir%/post~^Program to deliver a message
218 ^/tmp/mhmail*~^Temporary copy of message
222 dist(1), inc(1), mh-format(5), post(8), send(1)
226 .RB ` \-from "' defaults to sender's local mailbox (localmbox)"
227 .RB ` \-profile "' is enabled by default only with " \-attach
236 context changes occur. With the
238 switch, the context of