bb81ddb64971d2ff6996f562c442629e5b18e050
[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 the mailproc) back to the user.  If
83 .B \-forward
84 is given, then a copy
85 of the draft will be attached to this failure notice.  Using
86 .B \-push
87 differs from putting
88 .B send
89 in the background because the output is
90 trapped and analyzed by
91 .BR nmh .
92 .PP
93 If
94 .B \-verbose
95 is specified,
96 .B send
97 will indicate the interactions
98 occurring with the transport system, prior to actual delivery.
99 If
100 .B \-watch
101 is specified
102 .B send
103 will monitor the delivery of local
104 and network mail.  Hence, by specifying both switches, a large detail
105 of information can be gathered about each step of the message's entry
106 into the transport system.
107 .PP
108 .B Send
109 with no
110 .I msg
111 argument will send the current message in the draft folder.
112 .B Send
113 always takes messages from the draft folder.
114 (But, a
115 .I +folder
116 argument might be added in the future.)
117 Consult the
118 .BR mh-draft (7)
119 man page for more information.
120 .PP
121 Once the transport system has successfully accepted custody of the
122 message, the message will be renamed with a leading comma, which allows
123 it to be retrieved until the next draft message is sent.  If there are
124 errors in the formatting of the message,
125 .B send
126 will abort with a
127 (hopefully) helpful error message.
128 .PP
129 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
130 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
131 sent to sighted recipients.  The blind recipients will receive an entirely
132 new message with a minimal set of headers.  Included in the body of the
133 message will be a copy of the message sent to the sighted recipients.
134 .PP
135 If a \*(lqDcc:\*(rq field is encountered, its addresses will be used for
136 delivery, and the \*(lqDcc:\*(rq field will be removed from the message.  The
137 blind recipients will receive the same message sent to the sighted
138 recipients. *WARNING* Recipients listed in the \*(lqDcc:\*(rq field receive no
139 explicit indication that they have received a \*(lqblind copy\*(rq.
140 This can cause blind recipients to
141 inadvertently reply to all of the sighted recipients of the
142 original message, revealing that they received a blind copy.
143 On the other hand, since a normal reply to a message sent
144 via a \*(lqBcc:\*(rq field
145 will generate a reply only to the sender of the original message,
146 it takes extra effort in most mailers to reply to the included
147 message, and so would usually only be done deliberately, rather
148 than by accident.
149 .PP
150 Prior to sending the message, the fields \*(lqFrom:\ user@local\*(rq,
151 and \*(lqDate:\ now\*(rq will be appended to the headers in the message.
152 If the environment variable
153 .B $SIGNATURE
154 is set, then its value
155 is used as your personal name when constructing the \*(lqFrom:\*(rq
156 line of the message.  If this environment variable is not set, then
157 .B send
158 will consult the profile entry \*(lqSignature\*(rq for
159 this information.
160 .PP
161 If
162 .B send
163 is re\-distributing a message (when invoked by
164 .BR dist ),
165 then \*(lqResent\-\*(rq will be prepended to each of these
166 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
167 If the message already contains a \*(lqFrom:\*(rq field, then a
168 \*(lqSender: user@local\*(rq field will be added as well.  (An already
169 existing \*(lqSender:\*(rq field is an error!)
170 .PP
171 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
172 to the specified folder for the sender in the format in which it will
173 appear to any non\-Bcc receivers of the message.  That is, it will have
174 the appended fields and field reformatting.  The \*(lqFcc:\*(rq fields
175 will be removed from all outgoing copies of the message.
176 .PP
177 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
178 additional alias files given by the
179 .B \-alias
180 .I aliasfile
181 switch will be
182 read (more than one file, each preceded by
183 .BR \-alias ,
184 can be named).
185 See
186 .BR mh\-alias (5)
187 for more information.
188
189 .SH FILES
190 .fc ^ ~
191 .nf
192 .ta \w'%etcdir%/ExtraBigFileName  'u
193 ^$HOME/.mmh/profile~^The user profile
194 ^+drafts~^The draft folder
195 .fi
196
197 .SH "PROFILE COMPONENTS"
198 .fc ^ ~
199 .nf
200 .ta 2.4i
201 .ta \w'ExtraBigProfileName  'u
202 ^Path:~^To determine the user's mail storage
203 ^Draft\-Folder:~^To set the default draft\-folder
204 ^Aliasfile:~^For a default alias file
205 ^Signature:~^To determine the user's mail signature
206 ^Attachment\-Header:~^To set the name of the attachment header field
207 ^mailproc:~^Program to post failure notices
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.