1 .TH MHMAIL %manext1% 2012-07-01 "%nmhversion%"
6 mhmail \- send or read mail non-interactively with nmh
37 .RB [ \-send " | " \-nosend ]
40 with no arguments is equivalent to
45 is intended as a replacement, compatible with
47 for the standard Berkeley mail program
52 is intended for the use of programs such as
54 which expect to send mail automatically. It is also used by some
56 commands to mail error notifications. Although
58 can be used interactively, it is recommended that
62 be used instead, to send messages.
64 When invoked without arguments,
68 to incorporate new messages from the user's mail drop.
70 When one or more addresses are specified, a message is read from the
71 standard input and spooled to a temporary file.
74 by default, with the name of the temporary file as its argument, to
75 by default, with the name of the temporary file as its argument to
76 deliver the message to the specified address.
80 switch can be used to specify the \*(lqSubject:\*(rq field of the message.
81 \*(lqSubject:\*(rq field of the message.
85 switch indicates that the message body is a fully formed message that
88 would do. For example:
92 mhmail u2@example.com -resent <\`mhpath cur\`
98 will read the message to be sent from the standard input.
99 You can specify the text of the message at the command
103 switch. If the standard input has zero length,
105 will not send the message and return with status 1. You can use the switch
107 \*(lq\*(rq to force an empty message.
109 Normally, addresses appearing as arguments are put in the \*(lqTo:\*(rq
110 field. At least one such address is required when sending a message,
111 i.e., if any other switches are supplied. If the
113 switch is used, all addresses following it, even if there are
114 intervening switches other than
116 are placed in the \*(lqcc:\*(rq field. The optional
118 switch can appear in front of any addresses to signify their placement
119 in the \*(lqTo:\*(rq field. The
123 switches may be given multiple times.
128 you can specify the \*(lqFrom:\*(rq header of the draft. If no
130 switch is used when sending,
132 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox,
139 will fill in the \*(lqSender:\*(rq header correctly.
144 switch adds a header field with the specified name and value to the
149 in RFC 2822, but that's too easily confused with the message body.)
150 There need not be a space after the colon that separates the
151 name and value in the argument to this switch. It is usually best to
152 enclose the argument in quotes to protect it from the shell. The
154 switch may be given multiple times to add multiple header fields,
159 mhmail -from sender@example.com \\
160 -headerfield 'MIME-Version:1.0' \\
161 -headerfield 'Content-Type:text/plain; charset=utf-8' \\
162 -headerfield 'Content-Transfer-Encoding:8bit' \\
163 recipient@example.com
167 Note about this example: the
173 headers to be added to the message.
183 to send the message. This allows use of the user's context and aliases.
188 switch attaches the specified file to the message. Use of
196 to handle the attachment. It is usually best to enclose the argument
197 in quotes to protect it from the shell. The
199 switch may be given multiple times to add multiple attachments.
203 option shows the draft file that would be posted/sent on the command's
204 standard output but does not post or send it.
206 provides the default behavior of posting or sending the message. It
207 can be used to disable
209 for example, when using a shell alias.
211 All other switches are passed to
223 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
224 ^%bindir%/inc~^Program to incorporate mail drop into folder
225 ^%nmhlibexecdir%/post~^Program to deliver a message
226 ^/tmp/mhmail*~^Temporary copy of message
236 .RB ` "\-from localmbox" '
237 .RB ` \-profile "' is enabled by default only with " \-attach
245 context changes occur. With the
247 switch, the context of
251 does not read the context file itself, so an entry for it will be