2.5 MIME

Message is a MIME-compliant posting agent. The user generally doesn’t have to do anything to make the MIME happen—Message will automatically add the Content-Type and Content-Transfer-Encoding headers.

The most typical thing users want to use the multipart things in MIME for is to add “attachments” to mail they send out. This can be done with the C-c C-a command (M-x mml-attach-file), which will prompt for a file name and a MIME type.

If your Emacs supports drag and drop, you can also drop the file in the Message buffer. The variable mml-dnd-protocol-alist specifies what kind of action is done when you drop a file into the Message buffer. The variable mml-dnd-attach-options controls which MIME options you want to specify when dropping a file. If it is a list, valid members are type, description and disposition. disposition implies type. If it is nil, don’t ask for options. If it is t, ask the user whether or not to specify options.

If your system supports it, you can also insert screenshots directly into the Message buffer. The C-c C-p (message-insert-screenshot) command inserts the image into the buffer as an MML part, and puts an image text property on top. The message-screenshot-command variable says what external command to use to take the screenshot. It defaults to "import png:-", which is an ImageMagick command.

You can also create arbitrarily complex multiparts using the MML language (see Composing in The Emacs MIME Manual).