summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2002-12-22 11:17:24 +0000
committerMartin Michlmayr <tbm@cyrius.com>2002-12-22 11:17:24 +0000
commit3e2dd76144d4fc83f1a95b597a3760f3488badc6 (patch)
tree6e409cee0629434694d37013cc9d7e5ba944e8c5 /hdrline.c
parentc0c633f370ef38b2091e10a4b05dba2eb97aa894 (diff)
Add %A to the format strings, which expands to the reply-to address
(if present) or to the author's address when there's no Reply-To header.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hdrline.c b/hdrline.c
index 33c8108a..5634a6b5 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -205,6 +205,7 @@ int mutt_user_is_recipient (HEADER *h)
}
/* %a = address of author
+ * %A = reply-to address (if present; otherwise: address of author
* %b = filename of the originating folder
* %B = the list to which the letter was sent
* %c = size of message in bytes
@@ -267,6 +268,14 @@ hdr_format_str (char *dest,
dest[0] = 0;
switch (op)
{
+ case 'A':
+ if(hdr->env->reply_to && hdr->env->reply_to->mailbox)
+ {
+ mutt_format_s (dest, destlen, prefix, hdr->env->reply_to->mailbox);
+ break;
+ }
+ /* fall through if 'A' returns nothing */
+
case 'a':
if(hdr->env->from && hdr->env->from->mailbox)
{