]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-reply.rst
doc: convert sphinx based docs
[notmuch] / doc / man1 / notmuch-reply.rst
1 =============
2 notmuch-reply
3 =============
4
5 SYNOPSIS
6 ========
7
8 **notmuch** **reply** [option ...] <*search-term*> ...
9
10 DESCRIPTION
11 ===========
12
13 Constructs a reply template for a set of messages.
14
15 To make replying to email easier, **notmuch reply** takes an existing
16 set of messages and constructs a suitable mail template. The Reply-to:
17 header (if any, otherwise From:) is used for the To: address. Unless
18 ``--reply-to=sender`` is specified, values from the To: and Cc: headers
19 are copied, but not including any of the current user's email addresses
20 (as configured in primary\_mail or other\_email in the .notmuch-config
21 file) in the recipient list.
22
23 It also builds a suitable new subject, including Re: at the front (if
24 not already present), and adding the message IDs of the messages being
25 replied to to the References list and setting the In-Reply-To: field
26 correctly.
27
28 Finally, the original contents of the emails are quoted by prefixing
29 each line with '> ' and included in the body.
30
31 The resulting message template is output to stdout.
32
33 Supported options for **reply** include
34
35     ``--format=``\ (**default**\ \|\ **json**\ \|\ **sexp**\ \|\ **headers-only**)
36
37         **default**
38             Includes subject and quoted message body as an RFC 2822
39             message.
40
41         **json**
42             Produces JSON output containing headers for a reply message
43             and the contents of the original message. This output can be
44             used by a client to create a reply message intelligently.
45
46         **sexp**
47             Produces S-Expression output containing headers for a reply
48             message and the contents of the original message. This
49             output can be used by a client to create a reply message
50             intelligently.
51
52         **headers-only**
53             Only produces In-Reply-To, References, To, Cc, and Bcc
54             headers.
55
56     ``--format-version=N``
57         Use the specified structured output format version. This is
58         intended for programs that invoke **notmuch(1)** internally. If
59         omitted, the latest supported version will be used.
60
61     ``--reply-to=``\ (**all**\ \|\ **sender**)
62
63         **all** (default)
64             Replies to all addresses.
65
66         **sender**
67             Replies only to the sender. If replying to user's own
68             message (Reply-to: or From: header is one of the user's
69             configured email addresses), try To:, Cc:, and Bcc: headers
70             in this order, and copy values from the first that contains
71             something other than only the user's addresses.
72
73     ``--decrypt``
74         Decrypt any MIME encrypted parts found in the selected content
75         (ie. "multipart/encrypted" parts). Status of the decryption will
76         be reported (currently only supported with --format=json and
77         --format=sexp) and on successful decryption the
78         multipart/encrypted part will be replaced by the decrypted
79         content.
80
81         Decryption expects a functioning **gpg-agent(1)** to provide any
82         needed credentials. Without one, the decryption will fail.
83
84 See **notmuch-search-terms(7)** for details of the supported syntax for
85 <search-terms>.
86
87 Note: It is most common to use **notmuch reply** with a search string
88 matching a single message, (such as id:<message-id>), but it can be
89 useful to reply to several messages at once. For example, when a series
90 of patches are sent in a single thread, replying to the entire thread
91 allows for the reply to comment on issues found in multiple patches. The
92 default format supports replying to multiple messages at once, but the
93 JSON and S-Expression formats do not.
94
95 EXIT STATUS
96 ===========
97
98 This command supports the following special exit status codes
99
100 ``20``
101     The requested format version is too old.
102
103 ``21``
104     The requested format version is too new.
105
106 SEE ALSO
107 ========
108
109 **notmuch(1)**, **notmuch-config(1)**, **notmuch-count(1)**,
110 **notmuch-dump(1)**, **notmuch-hooks(5)**, **notmuch-insert(1)**,
111 **notmuch-new(1)**, **notmuch-restore(1)**, **notmuch-search(1)**,
112 **notmuch-search-terms(7)**, **notmuch-show(1)**, **notmuch-tag(1)**