4 .TH MHMAIL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mhmail \- send or read mail
32 .RB [ \-send " | " \-nosend ]
38 is intended as a replacement for the standard Berkeley
43 which is compatible with
45 This program is intended for the use of programs such as
47 which expect to send mail automatically to various
48 users. It is also used by various
50 commands to mail various
51 error notifications. Although
53 can be used interactively,
54 it is recommended that
58 be used instead to send messages.
60 When invoked without arguments, it simply invokes
62 to incorporate new messages from the user's maildrop. When one or more users
63 is specified, a message is read from the standard input and spooled to
69 name of the temporary file as its argument to deliver the message to
75 switch can be used to specify the
76 \*(lqSubject:\*(rq field of the message.
80 switch indicates that the message body is a fully formed message that
83 would do. For example:
87 mhmail u2@example.com -resent < `mhpath cur`
93 will read the message to be sent from the
94 standard input. You can specify the text of the message at the command
98 switch. If the standard input has zero
101 will not send the message and return with status 1. You can use the switch
103 \*(lq\*(rq to force an empty message.
105 Normally, addresses appearing as arguments are put in the \*(lqTo:\*(rq
108 switch is used, all addresses following it, even if there are
109 intervening switches, are placed in the \*(lqcc:\*(rq field.
114 you can specify the \*(lqFrom:\*(rq header of
117 switch is used when sending,
119 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox.
122 will fill\-in the \*(lqSender:\*(rq
128 switch adds a header field with the specified name and body to the
129 message. There need not be a space after the colon that separates the
130 name and body in the argument to this switch. It is usually best to
131 enclose the argument in quotes to protect it from the shell. The
133 switch may be given multiple times to add multiple header fields,
138 mhmail -from sender@example.com \\
139 -header\-field 'MIME-Version:1.0' \\
140 -header\-field 'Content-Type:text/plain; charset=utf-8' \\
141 -header\-field 'Content-Transfer-Encoding:8bit' \\
142 recipient@example.com
154 to send the message. This allows use of the user's context and aliases.
158 option shows the draft file that would be posted/sent on the command's
159 standard output but does not post or send it.
161 provides the default behavior of posting or sending the message. It
162 can be used to disable
164 for example, when using a shell alias.
166 All other switches are passed on to
179 .ta \w'%etcdir%/ExtraBigFileName 'u
180 ^%bindir%/inc~^Program to incorporate maildrop into folder
181 ^%libdir%/post~^Program to deliver a message
182 ^/tmp/mhmail*~^Temporary copy of message
186 dist(1), inc(1), post(8), send(1)
196 context changes occur. With the
198 switch, the context of