Generate a From: header, using localmbox, if the user doesn't provide
[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 [ \-version ]
23 .RB [ \-help ] 
24 .ad
25 .SH DESCRIPTION
26 .B mhmail
27 is intended as a replacement for the standard Berkeley
28 mail program
29 .RB ( mail
30 or
31 .BR mailx ),
32 which is compatible with
33 .BR nmh .
34 This program is intended for the use of programs such as
35 .BR cron ,
36 which expect to send mail automatically to various
37 users.  It is also used by various
38 .B nmh
39 commands to mail various
40 error notifications.  Although
41 .B mhmail
42 can be used interactively,
43 it is recommended that
44 .B comp
45 and
46 .B send
47 be used instead to send messages.
48 .PP
49 When invoked without arguments, it simply invokes
50 .B inc
51 to incorporate new messages from the user's maildrop.  When one or more users
52 is specified, a message is read from the standard input and spooled to
53 a temporary file.
54 .B mhmail
55 then invokes
56 .B post
57 with the
58 name of the temporary file as its argument to deliver the message to
59 the specified user.
60 .PP
61 The
62 .B \-subject
63 .I subject
64 switch can be used to specify the
65 \*(lqSubject:\*(rq field of the message.
66 .PP
67 By default,
68 .B mhmail
69 will read the message to be sent from the
70 standard input.  You can specify the text of the message at the command
71 line with the
72 .B \-body
73 .I text
74 switch.  If the standard input has zero
75 length,
76 .B mhmail
77 will not send the message.  You can use the switch
78 .B \-body
79 \*(lq\*(rq to force an empty message.
80 .PP
81 Normally, addresses appearing as arguments are put in the \*(lqTo:\*(rq
82 field.  If the
83 .B \-cc
84 switch is used, all addresses following it are
85 placed in the \*(lqcc:\*(rq field.
86 .PP
87 By using
88 .B \-from
89 .IR addr ,
90 you can specify the \*(lqFrom:\*(rq header of
91 the draft.  If no
92 .B \-from
93 switch is used when sending,
94 .B mhmail
95 will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox.
96 Naturally,
97 .B post
98 will fill\-in the \*(lqSender:\*(rq
99 header correctly.
100
101 .SH FILES
102 .fc ^ ~
103 .nf
104 .ta \w'%etcdir%/ExtraBigFileName  'u
105 ^%bindir%/inc~^Program to incorporate maildrop into folder
106 ^%libdir%/post~^Program to deliver a message
107 ^/tmp/mhmail*~^Temporary copy of message
108 .fi
109
110 .SH "SEE ALSO"
111 inc(1), post(8)
112
113 .SH DEFAULTS
114 None
115
116 .SH CONTEXT
117 If
118 .B inc
119 is invoked, then
120 .BR inc 's
121 context changes occur.