Added -resent support to mhmail. It doesn't work with -profile, though.
[mmh] / man / mhmail.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MHMAIL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 mhmail \- send or read mail
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B mhmail
11 .RI [ addrs
12 \&...]
13 .RB [ \-body
14 .IR text ]
15 .RB [ \-cc
16 .I addrs
17 \&...]
18 .RB [ \-from
19 .IR addr ]
20 .RB [ \-subject
21 .IR subject ]
22 .RB [ \-resent ]
23 [switches\ for
24 .I post
25 \&... |
26 .RB \-profile
27 [switches\ for
28 .I send
29 \&...]]
30 .RB [ \-version ]
31 .RB [ \-help ]
32 .RB [ \-debug ]
33 .ad
34 .SH DESCRIPTION
35 .B mhmail
36 is intended as a replacement for the standard Berkeley
37 mail program
38 .RB ( mail
39 or
40 .BR mailx ),
41 which is compatible with
42 .BR nmh .
43 This program is intended for the use of programs such as
44 .BR cron ,
45 which expect to send mail automatically to various
46 users.  It is also used by various
47 .B nmh
48 commands to mail various
49 error notifications.  Although
50 .B mhmail
51 can be used interactively,
52 it is recommended that
53 .B comp
54 and
55 .B send
56 be used instead to send messages.
57 .PP
58 When invoked without arguments, it simply invokes
59 .B inc
60 to incorporate new messages from the user's maildrop.  When one or more users
61 is specified, a message is read from the standard input and spooled to
62 a temporary file.
63 .B mhmail
64 then invokes
65 .B post
66 with the
67 name of the temporary file as its argument to deliver the message to
68 the specified user.
69 .PP
70 The
71 .B \-subject
72 .I subject
73 switch can be used to specify the
74 \*(lqSubject:\*(rq field of the message.
75 .PP
76 The
77 .B \-resent
78 switch indicates that the message body is a fully formed message that
79 will be resent, as
80 .B dist
81 would do.  For example:
82 .PP
83     mhmail u2@example.com -resent < `mhpath cur`
84 .PP
85 By default,
86 .B mhmail
87 will read the message to be sent from the
88 standard input.  You can specify the text of the message at the command
89 line with the
90 .B \-body
91 .I text
92 switch.  If the standard input has zero
93 length,
94 .B mhmail
95 will not send the message and return with status 1.  You can use the switch
96 .B \-body
97 \*(lq\*(rq to force an empty message.
98 .PP
99 Normally, addresses appearing as arguments are put in the \*(lqTo:\*(rq
100 field.  If the
101 .B \-cc
102 switch is used, all addresses following it, even if there are
103 intervening switches, are placed in the \*(lqcc:\*(rq field.
104 .PP
105 By using
106 .B \-from
107 .IR addr ,
108 you can specify the \*(lqFrom:\*(rq header of
109 the draft.  If no
110 .B \-from
111 switch is used when sending,
112 .B mhmail
113 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox.
114 Naturally,
115 .B post
116 will fill\-in the \*(lqSender:\*(rq
117 header correctly.
118 .PP
119 The
120 .B \-profile
121 switch instructs
122 .B mhmail
123 to use
124 .B send
125 instead of
126 .B post
127 to send the message.  This allows use of the user's context and aliases.
128 .PP
129 The
130 .B \-debug
131 option shows the draft file that would be posted/sent and the command
132 that would be used to post/send the draft, but does not post or send
133 it.
134 .PP
135 All other switches are passed on to
136 .B post
137 if
138 .B \-profile
139 is not used, or
140 .B send
141 if
142 .B \-profile
143 is used.
144
145 .SH FILES
146 .fc ^ ~
147 .nf
148 .ta \w'%etcdir%/ExtraBigFileName  'u
149 ^%bindir%/inc~^Program to incorporate maildrop into folder
150 ^%libdir%/post~^Program to deliver a message
151 ^/tmp/mhmail*~^Temporary copy of message
152 .fi
153
154 .SH "SEE ALSO"
155 dist(1), inc(1), post(8), send(1)
156
157 .SH DEFAULTS
158 None
159
160 .SH CONTEXT
161 If
162 .B inc
163 is invoked, then
164 .BR inc 's
165 context changes occur.  With the
166 .B \-profile
167 switch, the context of
168 .B send
169 is used.