# Mail Formatting
by Brent Welch

exmh does a few different types of mail formatting. The most basic is to break long lines. This is done by default on all mail messages, although you can disable line breaking if you have important formatting in your messages. This is discussed in the Section MIME Formatting. Another basic formatting type is the conversion of different fonts into the MIME content of text/enriched. Finally, you can insert files as parts of a multipart MIME content.

## Line Breaks

By default, you can just type in text. The text will wrap at word boundaries when the line gets too long. This actually happens twice. The first "wrap" is by the Tk text widget when you enter text. Unfortunately, Tk doesn't actually insert newline characters, and it wraps lines based on the size of the window. Therefore, exmh does the actual line breaking after you press the `Send` button. The default line length limit is 79; you can change that in the `Simple Edit` preferences section.

Hint: If you change the line length, also resize the editor window to match the width (such as 72) so that your message will look right as you type it in. Set the following resource in your ~/.exmh-defaults file:

        *Sedit*Text.width: 72

## Changing Fonts

You can use the `Text...` menu to change the font of the selected text. This promotes your message to a MIME content-type of text/enriched. The encoding of these text looks is also done when you press the `Send` button. You may see the encoding after clicking `Send` as a side-effect of the way this is implemented.

## Inserting Files

The `Insert File...` menu entry is used to insert a file as-is, with no MIME structure. The file is added at the current insert point in the editor.

The `Insert @` button is used to insert the body of the message you are replying to. This button is only enabled when you are replying to a message. The body is formatted a little: each line of the message body is prefixed with a string. The default is "> "; you can change this via the `Simple Editor` preferences section.

Note: It is apparently not possible to define a reply prefix with leading spaces. This is a side-effect of storing the prefix in the X resources database.