.Dd May 24, 2007 .Dt ATTACH 1 .Os NetBSD 1.4T .Sh NAME .Nm attach .Nd MIME attachment construction utility .Sh SYNOPSIS .Nm .Ar base-message .Oo .Op Fl text Ar charset .Op Fl enc Ar encoding .Op Fl name Ar filename .Ar filename .Oc .Ar ... .Sh DESCRIPTION .Nm builds MIME messages with attachments. .Ar base-message is a filename giving the message to which the attachments are to be attached. This is expected to be a message formatted per RFC 2045, which is used to form the non-attachment portion of the result. Following this are zero or more .Ar filename Ns s , each of which corresponds to one attachment, each optionally with some flags preceding it. .Pp Any of the filenames (either the base message or an attachment) may be .Sq \&- to indicate that the data in question should be taken from standard input; of course, it does not make sense to do this for more than one input. .Pp The flags that can be given for an attachment are: .Bl -tag -width indent .It Fl text Specifies that the attachment is a text type. It will be marked text/plain with the specified .Ar charset (the resulting message can of course be edited if this is incorrect). Without this, the attachment will be marked application/octet-stream. .It Fl enc Specifies the encoding. By default, text attachments are encoded using quoted-printable and other attachments are encoded using base64. This can be used to override the default; the .Ar encoding can be .Bl -tag -width indent .It 7bit The attachment is not encoded. If any octets outside the 0x00-0x7f range are found in its content, a warning is printed. .It 8bit The attachment is not encoded. Any octet value is accepted. .It base64 The attachment is to be encoded with base64 encoding. .It \&+base64 The attachment is encoded with base64 encoding, and is already encoded. The encoding will be checked for correctness and any problems will produce warnings. .It quoted-printable The attachment is to be encoded with quoted-printable encoding. .It \&+quoted-printable The attachment is encoded with quoted-printable encoding, and is already encoded. The encoding will be checked for correctness and any problems will produce warnings. .It qp An abbreviation for .Sq quoted-printable . .It \&+qp An abbreviation for .Sq \&+quoted-printable . .El .It Fl name Normally, the filename in the Content-Disposition: header is the last component of the pathname given on the command line, or .Sq stdin if the name given is .Sq \&- . This overrides the default, allowing any name to be specified. .El .Pp The resulting message-with-attachments is generated on the standard output. .Sh AUTHOR der Mouse, .Aq mouse@rodents.montreal.qc.ca .