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