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