GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: Composing Mail   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index

3.5.4.7 Attaching a File to the Message

The ‘~+’ escape attaches a file to the message. It takes one to three arguments. The first argument supplies the name of the file to attach:

~+ myfile.txt

The file will be attached with default content-type ‘application/octet-stream’, and encoding ‘base64’ (these can be altered by the --content-type and --encoding command line options, correspondingly).

Optional second argument defines the content type to be used instead of the default one. Optional third argument defines the encoding, e.g.:

~+ myfile.html text/html base64

To list the files attached so far, use the ‘~l’ escape:

~l
multipart/mixed
   1 myfile.html text/html base64

The first line of the output shows the content type of the message. Each subsequent line contains the ordinal number of the attachment, the name of the file, content-type and transfer encoding used.

The ‘~/’ escape toggles the content type bewteen ‘multipart/mixed’, and ‘multipart/alternative’. The new value of the content type is displayed on the screen.

The ‘~^’ escape removes attachments. Its argument is the number of the attachment to remove, e.g.:

~^ 1

GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: Composing Mail   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index