1 .TH MHMAIL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mhmail \- send or read mail
35 .RB [ \-send " | " \-nosend ]
41 with no arguments is equivalent to
46 is intended as a replacement for the standard Berkeley
51 which is compatible with
53 This program is intended for the use of programs such as
55 which expect to send mail automatically to various addresses. It is
58 commands to mail various
59 error notifications. Although
61 can be used interactively,
62 it is recommended that
66 be used instead to send messages.
68 When invoked without arguments, it simply invokes
70 to incorporate new messages from the user's maildrop.
72 When one or more addresses are specified, a message is read from the
73 standard input and spooled to a temporary file.
77 by default, with the name of the temporary file as its argument to
78 deliver the message to the specified address.
83 switch can be used to specify the
84 \*(lqSubject:\*(rq field of the message.
88 switch indicates that the message body is a fully formed message that
91 would do. For example:
95 mhmail u2@example.com -resent < `mhpath cur`
101 will read the message to be sent from the
102 standard input. You can specify the text of the message at the command
106 switch. If the standard input has zero
109 will not send the message and return with status 1. You can use the switch
111 \*(lq\*(rq to force an empty message.
113 Normally, addresses appearing as arguments are put in the \*(lqTo:\*(rq
114 field. At least one such address is required when sending a message,
115 i.e., if any other switches are supplied. If the
117 switch is used, all addresses following it, even if there are
118 intervening switches other than
120 are placed in the \*(lqcc:\*(rq field. The optional
122 switch can appear in front of any addresses to signify their placement
123 in the \*(lqTo:\*(rq field. The
127 switches may be given multiple times.
132 you can specify the \*(lqFrom:\*(rq header of
135 switch is used when sending,
137 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox,
144 will fill\-in the \*(lqSender:\*(rq
150 switch adds a header field with the specified name and value to the
155 in RFC 2822, but that's too easily confused with the message body.)
156 There need not be a space after the colon that separates the
157 name and value in the argument to this switch. It is usually best to
158 enclose the argument in quotes to protect it from the shell. The
160 switch may be given multiple times to add multiple header fields,
165 mhmail -from sender@example.com \\
166 -headerfield 'MIME-Version:1.0' \\
167 -headerfield 'Content-Type:text/plain; charset=utf-8' \\
168 -headerfield 'Content-Transfer-Encoding:8bit' \\
169 recipient@example.com
173 Note about this example: the
179 headers to be added to the message.
189 to send the message. This allows use of the user's context and aliases.
194 switch attaches the specified file to the message. Use of
202 to handle the attachment. It is usually best to enclose the argument
203 in quotes to protect it from the shell. The
205 switch may be given multiple times to add multiple attachments.
209 option shows the draft file that would be posted/sent on the command's
210 standard output but does not post or send it.
212 provides the default behavior of posting or sending the message. It
213 can be used to disable
215 for example, when using a shell alias.
217 All other switches are passed on to
229 .ta \w'%etcdir%/ExtraBigFileName 'u
230 ^%bindir%/inc~^Program to incorporate maildrop into folder
231 ^%libdir%/post~^Program to deliver a message
232 ^/tmp/mhmail*~^Temporary copy of message
235 dist(1), inc(1), mh-format(5), post(8), send(1)
238 .RB ` "\-from localmbox" '
239 .RB ` \-profile "' is enabled by default only with " \-attach
247 context changes occur. With the
249 switch, the context of
253 does not read the context file itself, so an entry for it will be