man > comp(1)

COMP(1mh) β€” COMP(1mh)

πŸ“› NAME

comp β€” compose an nmh message

πŸš€ Quick Reference

Use CaseCommandDescription
Compose a new messagecompπŸ“ Opens editor to compose a new email
Edit an existing draftcomp -use✏️ Continue editing an unsent draft
Use a specific form templatecomp -form formfileπŸ“„ Use alternate message skeleton
Use an existing message as templatecomp +folder msgπŸ“¨ Start from a previously sent message
Set recipientscomp -to addr -cc addrπŸ‘₯ Pre-fill To and Cc fields
Set subjectcomp -subject "text"🏷️ Pre-fill Subject field
Override sender addresscomp -from addrπŸ“§ Set a different From address
Use a file as draftcomp -file fileπŸ“‚ Use existing file as message draft
Build draft without editingcomp -buildβš™οΈ Create draft for external processing (e.g., Emacs)

πŸ“‹ SYNOPSIS

comp [-help] [-version] [+folder] [msg] [-form formfile] [-use | -nouse] [-file file]
     [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit]
     [-width columns] [-from address] [-to address] [-cc address] [-fcc +folder] [-subject
     text] [-whatnowproc program] [-nowhatnowproc] [-build]

πŸ“ DESCRIPTION

comp is used to create a new message to be mailed. It copies a message form to the draft being composed and then invokes an editor on the draft (unless -noedit is given, in which case the initial edit is suppressed).

The default message template β€œcomponents” will direct comp to construct the message draft as follows:

From: {from switch} or <Local-Mailbox> or <username@hostname>
To: {to switch} or blank
cc: {cc switch} or blank
Fcc: {fcc switch} or +outbox
Subject: {subject switch} or blank
--------

If a file named β€œcomponents” exists in the user's nmh directory, it will be used instead of this form. You may specify an alternate forms file with the switch -form formfile.

You may also start comp using the contents of an existing message as the form. If you supply either a +folder or msg argument, that message will be used as the message form. You may not supply both a -form formfile and a +folder or msg argument. The line of dashes or a blank line must be left between the header and the body of the message for the message to be identified properly when it is sent (see send(1)).

The switch -use directs comp to continue editing an already started message. That is, if a comp (or dist, repl, or forw) is terminated without sending the draft, the draft can be edited again via β€œcomp -use”.

The -file file switch says to use the named file as the message draft.

Forms that are selected via the -form switch are processed via the nmh template system; see mh-format(5) for details. Drafts constructed from another message or with the -use or -file switches will not be processed with mh-format(5).

In addition to the standard mh-format(5) escapes, the following component escapes are either new or have an alternate meaning:

EscapeReturnsDescription
fccstringπŸ“ Any folders specified with -fcc folder
fromstringπŸ“§ Any addresses specified with -from address
tostringπŸ‘€ Any addresses specified with -to address
ccstringπŸ‘₯ Any addresses specified with -cc address
subjectstring🏷️ Any text specified with -subject text

By default the β€œTo:” and β€œcc:” fields are empty. You may add addresses to these fields with the -to address and -cc address switches. You may give these switches multiple times to add multiple addresses.

By default the β€œFrom:” field has either the value of the Local-Mailbox profile entry or a system default email address. This default can be overridden by using the -from address switch. The default mailbox in the β€œFcc:” field is +outbox.

πŸ“¬ -fcc switch

This can be overridden by the -fcc switch.

Any text you give to the -subject switch will be placed in the β€œSubject:” field in the draft.

If the draft already exists, comp will ask you as to the disposition of the draft. A reply of quit will abort comp, leaving the draft intact; replace will replace the existing draft with the appropriate form; list will display the draft; use will use the draft for further composition; and refile +folder will file the draft in the given folder, and give you a new draft with the appropriate form. (The +folder argument to refile is required.)

The -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility. This is an advanced (and highly useful) feature. Consult the mh-draft(5) man page for more information.

The -editor editor switch indicates the editor to use for the initial edit. Upon exiting from the editor, comp will invoke the whatnow program (see whatnow(1) for a discussion of available options). The invocation of this program can be inhibited by using the -nowhatnowproc switch. (In fact, it is the whatnow program which starts the initial edit. Hence, -nowhatnowproc will prevent any edit from occurring.)

⏭️ -nowhatnowproc switch

The -nowhatnowproc switch inhibits the invocation of the whatnow program.

πŸ”§ -build switch

The -build switch is intended to be used by the Emacs mh-e interface to nmh. It implies -nowhatnowproc. It causes a file <mh-dir>/draft to be created, containing the draft message that would normally be presented to the user for editing. No mail is actually sent.

πŸ“ FILES

βš™οΈ PROFILE COMPONENTS

πŸ“š SEE ALSO

βš™οΈ DEFAULTS

🌐 CONTEXT

None

πŸ› BUGS

If whatnowproc is whatnow, then comp uses a built-in whatnow, it does not actually run the whatnow program. Hence, if you define your own whatnowproc, don't call it whatnow since comp won't run it.

nmh-1.7.1 β€” 2013-10-18 β€” COMP(1mh)

comp(1)
πŸ“› NAME πŸš€ Quick Reference πŸ“‹ SYNOPSIS πŸ“ DESCRIPTION
πŸ“¬ -fcc switch ⏭️ -nowhatnowproc switch πŸ”§ -build switch
πŸ“ FILES βš™οΈ PROFILE COMPONENTS πŸ“š SEE ALSO βš™οΈ DEFAULTS 🌐 CONTEXT πŸ› BUGS

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-18 13:31 @216.73.217.177
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^