Next: , Previous: , Up: Composing Mail   [Contents][Index]


3.5.3.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
   1 myfile.html text/html base64

Each line of the listing contains the ordinal number of the attachment, the name of the file, content-type and transfer encoding used.

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

~^ 1