Added -attach switch to mhmail.
[mmh] / man / mhmail.man
index 6bbd8ae..3b382af 100644 (file)
@@ -10,6 +10,8 @@ mhmail \- send or read mail
 .B mhmail
 .RI [ addrs
 \&...]
+.RB [ \-attach
+.IR file ]
 .RB [ \-body
 .IR text ]
 .RB [ \-cc
@@ -17,6 +19,8 @@ mhmail \- send or read mail
 \&...]
 .RB [ \-from
 .IR addr ]
+.RB [ \-header\-field
+.IR name:body ]
 .RB [ \-subject
 .IR subject ]
 .RB [ \-resent ]
@@ -80,7 +84,11 @@ will be resent, as
 .B dist
 would do.  For example:
 .PP
-    mhmail u2@example.com -resent < `mhpath cur`
+.RS 5
+.nf
+mhmail u2@example.com -resent < `mhpath cur`
+.fi
+.RE
 .PP
 By default,
 .B mhmail
@@ -117,6 +125,35 @@ will fill\-in the \*(lqSender:\*(rq
 header correctly.
 .PP
 The
+.B \-header\-field
+.I name:body
+switch adds a header field with the specified name and body to the
+message.  There need not be a space after the colon that separates the
+name and body in the argument to this switch.  It is usually best to
+enclose the argument in quotes to protect it from the shell.  The
+.B \-header\-field
+switch may be given multiple times to add multiple header fields,
+for example,
+.PP
+.RS 5
+.nf
+mhmail -from sender@example.com \\
+-header\-field 'MIME-Version:1.0' \\
+-header\-field 'Content-Type:text/plain; charset=utf-8' \\
+-header\-field 'Content-Transfer-Encoding:8bit' \\
+recipient@example.com
+.fi
+.RE
+.PP
+Note about this example:  the
+.B \-attach
+switch causes
+.I MIME-Version
+and
+.I Content-Type
+headers to be added to the message.
+.PP
+The
 .B \-profile
 switch instructs
 .B mhmail
@@ -127,6 +164,22 @@ instead of
 to send the message.  This allows use of the user's context and aliases.
 .PP
 The
+.B \-attach
+.I file
+switch attaches the specified file to the message.  Use of
+.B \-attach
+enables
+.B \-profile
+because
+.B mhmail
+uses
+.B send
+to handle the attachment.  It is usually best to enclose the argument
+in quotes to protect it from the shell.  The
+.B \-attach
+switch may be given multiple times to add multiple attachments.
+.PP
+The
 .B \-nosend
 option shows the draft file that would be posted/sent on the command's
 standard output but does not post or send it.
@@ -159,7 +212,12 @@ is used.
 dist(1), inc(1), post(8), send(1)
 
 .SH DEFAULTS
+.nf
 .RB ` \-send '
+.fi
+.RB ` \-profile' ,
+enabled by default only with
+.B \-attach
 
 .SH CONTEXT
 If
@@ -171,8 +229,3 @@ context changes occur.  With the
 switch, the context of
 .B send
 is used.
-
-.SH BUGS
-.B \-resent
-cannot be used with
-.BR \-profile .