Hardcoded mhmail instead of mailproc.
[mmh] / man / send.man1
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH SEND %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 send \- send a message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B send
11 .RB [ \-alias
12 .IR aliasfile ]
13 .RB [ \-forward " | " \-noforward ]
14 .RB [ \-push " | " \-nopush ]
15 .RB [ \-verbose " | " \-noverbose ]
16 .RB [ \-watch " | " \-nowatch ]
17 .RB [ msg
18 \&...]
19 .RB [ \-version ]
20 .RB [ \-help ]
21 .ad
22 .SH DESCRIPTION
23 .B Send
24 will cause each of the specified messages to be delivered
25 to each of the destinations in the \*(lqTo:\*(rq, \*(lqCc:\*(rq,
26 \*(lqBcc:\*(rq, \*(lqDcc:\*(rq, and \*(lqFcc:\*(rq fields of the message.  If
27 .B send
28 is re\-distributing a message, as invoked from
29 .BR dist ,
30 then the
31 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
32 .PP
33 By default,
34 .B send
35 uses the program
36 .B post
37 to do the actual
38 delivery of the messages, although this can be changed by defining the
39 .I postproc
40 profile component.  Most of the features attributed to
41 .B send
42 are actually performed by
43 .BR post .
44 .PP
45 The draft is scanned for attachment header fields.
46 Their name defaults to ``Attach'', but may be changed by the value of the
47 .I Attachment-Header
48 profile entry.
49 If such header fields are found, or the body contains non-ASCII characters,
50 the message is converted to a MIME message.
51 This conversion occurs before all other processing.
52 .PP
53 The first part of the MIME message is the draft body if the body is non-empty.
54 The body of each attachment header field is interpreted as a file name,
55 and each file named is included as a separate part in the MIME message.
56 .PP
57 For file names with dot suffixes, the context is scanned for a
58 .I mhshow-suffix-
59 entry for that suffix.
60 The content-type for the part is taken from that context entry if a match is
61 found.
62 If no match is found or the file does not have a dot suffix, the content-type
63 is text/plain if the file contains only ASCII characters or
64 application/octet-stream otherwise.
65 .PP
66 The last component of the path name is taken as the name of the MIME parts.
67 A message part header for an attachment might be:
68 .PP
69 .nf
70 Content-Type: text/plain; name="VERSION"; charset="us-ascii"
71 Content-Disposition: attachment; filename="VERSION"
72 .fi
73 .PP
74 If
75 .B \-push
76 is specified,
77 .B send
78 will detach itself from the user's
79 terminal and perform its actions in the background.  If
80 .BR push 'd
81 and the draft can't be sent, then an error message will be sent (using
82 .BR mhmail )
83 back to the user.  If
84 .B \-forward
85 is given, then a copy
86 of the draft will be attached to this failure notice.  Using
87 .B \-push
88 differs from putting
89 .B send
90 in the background because the output is
91 trapped and analyzed by
92 .BR nmh .
93 .PP
94 If
95 .B \-verbose
96 is specified,
97 .B send
98 will indicate the interactions
99 occurring with the transport system, prior to actual delivery.
100 If
101 .B \-watch
102 is specified
103 .B send
104 will monitor the delivery of local
105 and network mail.  Hence, by specifying both switches, a large detail
106 of information can be gathered about each step of the message's entry
107 into the transport system.
108 .PP
109 .B Send
110 with no
111 .I msg
112 argument will send the current message in the draft folder.
113 .B Send
114 always takes messages from the draft folder.
115 (But, a
116 .I +folder
117 argument might be added in the future.)
118 Consult the
119 .BR mh-draft (7)
120 man page for more information.
121 .PP
122 Once the transport system has successfully accepted custody of the
123 message, the message will be renamed with a leading comma, which allows
124 it to be retrieved until the next draft message is sent.  If there are
125 errors in the formatting of the message,
126 .B send
127 will abort with a
128 (hopefully) helpful error message.
129 .PP
130 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
131 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
132 sent to sighted recipients.  The blind recipients will receive an entirely
133 new message with a minimal set of headers.  Included in the body of the
134 message will be a copy of the message sent to the sighted recipients.
135 .PP
136 If a \*(lqDcc:\*(rq field is encountered, its addresses will be used for
137 delivery, and the \*(lqDcc:\*(rq field will be removed from the message.  The
138 blind recipients will receive the same message sent to the sighted
139 recipients. *WARNING* Recipients listed in the \*(lqDcc:\*(rq field receive no
140 explicit indication that they have received a \*(lqblind copy\*(rq.
141 This can cause blind recipients to
142 inadvertently reply to all of the sighted recipients of the
143 original message, revealing that they received a blind copy.
144 On the other hand, since a normal reply to a message sent
145 via a \*(lqBcc:\*(rq field
146 will generate a reply only to the sender of the original message,
147 it takes extra effort in most mailers to reply to the included
148 message, and so would usually only be done deliberately, rather
149 than by accident.
150 .PP
151 Prior to sending the message, the fields \*(lqFrom:\ user@local\*(rq,
152 and \*(lqDate:\ now\*(rq will be appended to the headers in the message.
153 If the environment variable
154 .B $SIGNATURE
155 is set, then its value
156 is used as your personal name when constructing the \*(lqFrom:\*(rq
157 line of the message.  If this environment variable is not set, then
158 .B send
159 will consult the profile entry \*(lqSignature\*(rq for
160 this information.
161 .PP
162 If
163 .B send
164 is re\-distributing a message (when invoked by
165 .BR dist ),
166 then \*(lqResent\-\*(rq will be prepended to each of these
167 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
168 If the message already contains a \*(lqFrom:\*(rq field, then a
169 \*(lqSender: user@local\*(rq field will be added as well.  (An already
170 existing \*(lqSender:\*(rq field is an error!)
171 .PP
172 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
173 to the specified folder for the sender in the format in which it will
174 appear to any non\-Bcc receivers of the message.  That is, it will have
175 the appended fields and field reformatting.  The \*(lqFcc:\*(rq fields
176 will be removed from all outgoing copies of the message.
177 .PP
178 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
179 additional alias files given by the
180 .B \-alias
181 .I aliasfile
182 switch will be
183 read (more than one file, each preceded by
184 .BR \-alias ,
185 can be named).
186 See
187 .BR mh\-alias (5)
188 for more information.
189
190 .SH FILES
191 .fc ^ ~
192 .nf
193 .ta \w'%etcdir%/ExtraBigFileName  'u
194 ^$HOME/.mmh/profile~^The user profile
195 ^+drafts~^The draft folder
196 .fi
197
198 .SH "PROFILE COMPONENTS"
199 .fc ^ ~
200 .nf
201 .ta 2.4i
202 .ta \w'ExtraBigProfileName  'u
203 ^Path:~^To determine the user's mail storage
204 ^Draft\-Folder:~^To set the default draft\-folder
205 ^Aliasfile:~^For a default alias file
206 ^Signature:~^To determine the user's mail signature
207 ^Attachment\-Header:~^To set the name of the attachment header field
208 ^postproc:~^Program to post the message
209 .fi
210
211 .SH "SEE ALSO"
212 comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8)
213
214 .SH DEFAULTS
215 .nf
216 .RB ` msg "' defaults to the current message in the draft folder"
217 .RB ` \-forward '
218 .RB ` \-nopush '
219 .RB ` \-noverbose '
220 .RB ` \-nowatch '
221 .fi
222
223 .SH CONTEXT
224 None
225
226 .SH BUGS
227 Under some configurations, it is not possible to monitor the mail delivery
228 transaction;
229 .B \-watch
230 is a no-op on those systems.