simplify whatnow.c/main() function
[mmh] / man / mhmail.man1
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MHMAIL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 mhmail \- send mail
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B mhmail
11 .IR addrs ...
12 .RB [ \-cc
13 .IR addrs ...]
14 .RB [ \-from
15 .IR addr ]
16 .RB [ \-subject
17 .IR subject ]
18 .RB [ \-bodytext
19 .IR text ]
20 .RB [ \-Version ]
21 .RB [ \-help ]
22 .ad
23 .SH DESCRIPTION
24 .B mhmail
25 is inspired by the standard Berkeley mail program
26 .RB ( mail
27 or
28 .BR mailx ).
29 It should not be seen as a drop-in replacement for these programs,
30 but rather as a more convenient alternative to
31 .B comp
32 for non-interactive use.
33 For interactive use,
34 .B comp
35 and
36 .B send
37 are recommended over
38 .BR mhmail .
39 .PP
40 When one or more addresses
41 are specified, a message is read from the standard input and spooled to
42 a temporary file.
43 .B mhmail
44 then invokes
45 .B spost
46 to deliver the message.
47 .PP
48 .B mhmail
49 can not be used for mal reading. Use
50 .BR inc ,
51 .BR scan ,
52 .B show
53 instead.
54 .PP
55 The
56 .B \-subject
57 .I subject
58 switch can be used to specify the
59 `Subject:' field of the message.
60 .PP
61 By default,
62 .B mhmail
63 will read the message to be sent from the
64 standard input.
65 The message is terminated by either end-of-file or by a single period
66 alone on a line. This is compatible to
67 .B mail
68 and
69 .BR mailx .
70 Alternatively, you can specify the text of the message at the command
71 line with the
72 .B \-bodytext
73 .I text
74 switch.
75 .PP
76 If the standard input has zero length,
77 .B mhmail
78 will not send the message.  You can use
79 .B \-bodytext
80 "" to force an empty message.
81 .PP
82 Normally, addresses appearing as arguments are put in the `To:'
83 field.  If the
84 .B \-cc
85 switch is used, all addresses following it are
86 placed in the `Cc:' field.
87 .PP
88 By using
89 .B \-from
90 .IR addr ,
91 you can specify the `From:' header of
92 the draft.  Naturally,
93 .B post
94 will fill\-in the `Sender:'
95 header correctly.
96
97 .SH FILES
98 .fc ^ ~
99 .nf
100 .ta \w'%etcdir%/BigFileName  'u
101 ^/tmp/mhmail*~^Temporary copy of message
102 .fi
103
104 .SH "SEE ALSO"
105 inc(1), scan(1), show(1), post(8)
106
107 .SH DEFAULTS
108 None
109
110 .SH CONTEXT
111 None
112
113 .SH HISTORY
114 .B mhmail
115 was intended as a replacement for the standard Berkeley
116 mail program
117 .RB ( mail
118 or
119 .BR mailx ),
120 which is compatible with
121 .BR mmh .
122 This program was intended for the use of programs such as
123 .BR cron ,
124 which expect to send mail automatically to various
125 addresses.  It was also used by various
126 .B mmh
127 commands to mail various error notifications.
128 .PP
129 When invoked without arguments, it had once simply invoked
130 .B inc
131 to incorporate new messages from the user's maildrop.
132 It does this no longer.
133
134 .SH BUGS
135 .B mhmail
136 should no longer try to replace
137 .BR mailx ,
138 but become a mail sending front-end to
139 .B comp
140 or
141 .BR send ,
142 which is more convenient in some situations.