# man > comp(1)

---
type: CommandReference
command: comp
mode: man
section: 1mh
source: man-pages
---

## Quick Reference

- `comp` — Compose a new nmh message using default form
- `comp -use` — Continue editing an existing draft
- `comp +folder msg` — Use message `msg` in `+folder` as the form
- `comp -form myform` — Use alternate form file `myform`
- `comp -file draft.txt` — Start composition from file `draft.txt`
- `comp -to user@example.com` — Pre-populate To field
- `comp -subject "Meeting"` — Set Subject field
- `comp -build` — Build draft without sending (for Emacs integration)

## Name

**comp** — compose an nmh message

## 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`]

## Options

### Message form and draft source

- `+folder` `msg` — Use message `msg` in `+folder` as the message form (cannot be used with `-form`)
- `-form` *formfile* — Use alternate form file (processed via mh-format)
- `-use` — Continue editing an already started draft; suppress prompt for disposition
- `-nouse` — Always prompt for draft disposition (default)
- `-file` *file* — Use the named file as the message draft (not processed by mh-format)

### Draft folder (advanced)

- `-draftfolder` *+folder* — Specify folder for draft messages
- `-draftmessage` *msg* — Specify which draft message in the draft folder
- `-nodraftfolder` — Disable draft folder facility (default)

### Editing

- `-editor` *editor* — Editor to use for initial edit (overrides profile `Editor`)
- `-noedit` — Suppress initial edit (draft is created without editor invocation)

### Fields and headers

- `-from` *address* — Override From field (default: Local-Mailbox or system default)
- `-to` *address* — Add recipient to To field (may be given multiple times)
- `-cc` *address* — Add recipient to Cc field (may be given multiple times)
- `-fcc` *+folder* — Set Fcc folder (default: +outbox)
- `-subject` *text* — Set Subject field

### Other

- `-help` — Print help and exit
- `-version` — Print version and exit
- `-width` *columns* — Set terminal width for display
- `-whatnowproc` *program* — Program to use for the “What now?” prompt
- `-nowhatnowproc` — Skip the “What now?” program entirely
- `-build` — Build draft and send to standard output (no mail sent; implies `-nowhatnowproc`)

## Examples

- `comp` — Start composing a new message with default form
- `comp -use` — Resume editing the current draft
- `comp +inbox 42` — Use message 42 in inbox as the form for a new message
- `comp -form mytemplate` — Use a custom form file `mytemplate`
- `comp -file draft.txt` — Edit an existing file as a draft
- `comp -to alice -cc bob -subject "Project update"` — Pre-fill fields
- `comp -build` — Print the draft to stdout without sending

## Files

- `/etc/nmh/components` — Default message skeleton (system-wide)
- `<mh-dir>/components` — User's message skeleton
- `$HOME/.mh_profile` — User's nmh profile

## Profile Components

- `Path` — Location of nmh directory
- `Draft-Folder` — Default draft folder
- `Editor` — Default editor override
- `Msg-Protect` — File mode for new drafts
- `fileproc` — Program to refile messages
- `whatnowproc` — Program for “What now?” questions

## See Also

- [`dist`](https://www.chedong.com/phpMan.php/man/dist/1/markdown), [`forw`](https://www.chedong.com/phpMan.php/man/forw/1/markdown), [`repl`](https://www.chedong.com/phpMan.php/man/repl/1/markdown), [`send`](https://www.chedong.com/phpMan.php/man/send/1/markdown), [`whatnow`](https://www.chedong.com/phpMan.php/man/whatnow/1/markdown)
- [`mh-profile`](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown), [`mh-format`](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown), [`mh-draft`](https://www.chedong.com/phpMan.php/man/mh-draft/5/markdown)

## Notes

- Defaults: uses current folder, current message, no draft folder, no use of existing draft.
- If `whatnowproc` is named `whatnow`, `comp` uses a built‑in version; do not name a custom `whatnowproc` as `whatnow`.
- The `-build` switch sends the draft to standard output and does not send mail.
- The `-form` switch supports mh-format templates; `-use`, `-file`, and message‑based forms do not.
- Draft disposition prompts (quit, replace, list, use, refile) appear when an existing draft is found.