Sending Your First Email#
This tutorial shows you how to compose, reply, and send messages in NeoMutt.
If you haven’t configured SMTP yet, start with Writing Your First Configuration or the guided Start Here page.
Quick send:
Press m to compose a new message.
Enter the recipient and subject when prompted.
Write the message in your editor, save, and exit.
In the Compose Menu, press y to send.
Introduction#
The following bindings are available in the index and pager to start a new message.
Mail Sending Keys#
Key |
Function |
Description |
|---|---|---|
m |
|
compose a new message |
r |
|
reply to sender |
g |
|
reply to all recipients |
|
reply to all recipients preserving To/Cc |
|
L |
|
reply to a mailing list |
L |
|
send a subscription email to a mailing list |
L |
|
send an unsubscription email to a mailing list |
f |
|
forward message |
b |
|
bounce (remail) message |
Esc k |
|
mail a PGP public key to someone |
Bouncing a message sends the message as-is to the recipient you specify. Forwarding a message allows you to add comments or modify the message you are forwarding. These items are discussed in greater detail in the section “Forwarding and Bouncing Mail”.
NeoMutt will then enter the compose menu and prompt you for the recipients to place on the To: header field when you hit m to start a new message.
Next, it will ask you for the Subject: field for the message, providing a default if you are replying to or forwarding a message.
You again have the chance to adjust recipients, subject, and security settings right before actually sending the message.
See also $ask_cc, $ask_bcc, $auto_edit, $bounce, $fast_reply, and $include for changing how and if NeoMutt asks these questions.
When replying, NeoMutt fills these fields with proper values depending on the reply type. The types of replying supported are:
Simple reply : Reply to the author directly.
Group reply : Reply to the author; cc all other recipients; consults alternates and excludes you.
Group Chat reply : Reply to the author and other recipients in the To list; cc other recipients in the Cc list; consults alternates and excludes you.
List reply : Reply to all mailing list addresses found, either specified via configuration or auto-detected.
After getting recipients for new messages, forwards or replies, NeoMutt will then automatically start your $editor on the message body.
If the $edit_headers variable is set, the headers will be at the top of the message in your editor; the message body should start on a new line after the existing blank line at the end of headers.
Any messages you are replying to will be added in sort order to the message, with appropriate $attribution_intro, $indent_string and $attribution_trailer.
When forwarding a message, if the $mime_forward variable is unset, a copy of the forwarded message will be included.
If you have specified a $signature, it will be appended to the message.
Once you have finished editing the body of your mail message, you are returned to the compose menu providing the functions shown below to modify, send or postpone the message.
📷 Screenshot Needed
Subject: Compose flow — editor with headers
Description: A terminal showing NeoMutt’s editor view when composing a new message with $edit_headers enabled, displaying editable headers (From, To, Cc, Subject) at the top of the editor, followed by a blank line and the message body area with the signature appended.
Highlights: How headers appear as editable text at the top of the editor, the blank separator line between headers and body, and the signature placement at the end.
Editing the Message Header#
When editing the header because of $edit_headers being set, there are several pseudo headers available which will not be included in sent messages but trigger special NeoMutt behavior.
Fcc: Pseudo Header#
If you specify either of
Mutt-Fcc: filename
Fcc: filename
as a header, NeoMutt will pick up filename just as if you had used the <edit-fcc> function in the compose menu.
It can later be changed from the compose menu.
Attach: Pseudo Header#
You can also attach files to your message by specifying either of
Mutt-Attach: filename [description]
Attach: filename [description]
where filename is the file to attach and description is an optional string to use as the description of the attached file. Spaces in filenames have to be escaped using backslash (“\”). The file can be removed as well as more added from the compose menu.
Pgp: Pseudo Header#
If you want to use PGP, you can specify either of
Mutt-PGP: [ E | S | S <id> ]
Pgp: [ E | S | S <id> ]
“E” selects encryption, “S” selects signing and “S<id>” selects signing with the given key, setting $pgp_sign_as for the duration of the message composition session.
The selection can later be changed in the compose menu.
Smime: Pseudo Header#
If you want to use S/MIME, you can specify either of
Mutt-SMIME: [ E | S | S <id> ]
Smime: [ E | S | S <id> ]
“E” selects encryption, “S” selects signing and “S<id>” selects signing with the given key, setting $smime_sign_as for the duration of the message composition session.
The selection can later be changed in the compose menu.
In-Reply-To: Header#
When replying to messages, the In-Reply-To: header contains the Message-ID of the message(s) you reply to. If you remove or modify its value, NeoMutt will not generate a References: field, which allows you to create a new message thread, for example to create a new message to a mailing list without having to enter the mailing list’s address.
If you intend to start a new thread by replying, please make really sure you remove the In-Reply-To: header in your editor. Otherwise, though you’ll produce a technically valid reply, some netiquette guardians will be annoyed by this so-called “thread hijacking”.
Sending Cryptographically Signed/Encrypted Messages#
If you have told NeoMutt to PGP or S/MIME encrypt a message, it will guide you through a key selection process when you try to send the message. NeoMutt will not ask you any questions about keys which have a certified user ID matching one of the message recipients’ mail addresses. However, there may be situations in which there are several keys, weakly certified user ID fields, or where no matching keys can be found.
In these cases, you are dropped into a menu with a list of keys from which you can select one.
When you quit this menu, or NeoMutt can’t find any matching keys, you are prompted for a user ID.
You can, as usually, abort this prompt using ^G.
When you do so, NeoMutt will return to the compose screen.
📷 Screenshot Needed
Subject: PGP key selection menu
Description: The NeoMutt PGP key selection menu showing a list of available public keys with columns for key ID, capabilities (encryption/signing), validity flags, creation date, and associated user IDs/email addresses.
Highlights: The key capability indicators (e/s for encrypt/sign), the validity column showing trust level, and how multiple keys for the same recipient are listed for selection.
Once you have successfully finished the key selection, the message will be encrypted using the selected public keys when sent out.
To ensure you can view encrypted messages you have sent, you may wish to set $pgp_self_encrypt and $pgp_default_key for PGP, or $smime_self_encrypt and $smime_default_key for S/MIME.
Most fields of the entries in the key selection menu (see also $pgp_entry_format) have obvious meanings.
But some explanations on the capabilities, flags, and validity fields are in order.
The flags sequence (%f) will expand to one of the following flags:
Sending Format=Flowed Messages#
Concept#
format=flowed-style messages (or f=f for short) are text/plain messages that consist of paragraphs which a receiver’s mail client may reformat to its own needs, which mostly means to customize line lengths regardless of what the sender sent.
Technically this is achieved by letting lines of a “flowable” paragraph end in spaces except for the last line.
While for text-mode clients like NeoMutt it’s best to assume only a standard 80x24 character cell terminal, it may be desired to let the receiver decide completely how to view a message.
NeoMutt Support#
NeoMutt only supports setting the required format=flowed MIME parameter on outgoing messages if the $text_flowed variable is set, specifically it does not add the trailing spaces.
After editing, NeoMutt properly space-stuffs the message.
Space-stuffing is required by RFC3676, defining format=flowed, and means to prepend a space to:
all lines starting with a space
lines starting with the word “
From” followed by spaceall lines starting with “
>”, which is not intended to be a quote character
Note
NeoMutt only supports space-stuffing for the first two types of lines but not for the third: It is impossible to safely detect whether a leading > character starts a quote or not.
All leading spaces are to be removed by receiving clients to restore the original message prior to further processing.
Editor Considerations#
As NeoMutt provides no additional features to compose f=f messages, it’s completely up to the user and his editor to produce proper messages.
Please consider your editor’s documentation if you intend to send f=f messages.
For example, vim provides the w flag for its formatoptions setting to assist in creating f=f messages, see :help fo-table for details.
Reformatting#
NeoMutt has some support for reformatting when viewing and replying to format=flowed messages.
In order to take advantage of these, $reflow_text must be set.
Paragraphs are automatically reflowed and wrapped at a width specified by
$reflow_wrap.In its original format, the quoting style of
format=flowedmessages can be difficult to read, and doesn’t intermix well with non-flowed replies. Setting$reflow_space_quotesadds spaces after each level of quoting when in the pager and replying in a non-flowed format (i.e. with$text_flowedunset).If
$reflow_space_quotesis unset, NeoMutt will still add one trailing space after all the quotes in the pager (but not when replying).
Next Steps#
“I want to read and search mail faster.” See Reading Your First Email and Searching and Filtering Email.
“I want better address completion.” See Address Book.
“I want encryption and signing.” See Encryption and PGP.