1
0
forked from pool/mutt
mutt/mutt-1.5.20-sendgroupreplyto.diff

54 lines
1.5 KiB
Diff

---
init.h | 7 +++++++
options.h | 1 +
send.c | 12 ++++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
--- init.h
+++ init.h 2017-09-11 11:36:34.666630359 +0000
@@ -3135,6 +3135,13 @@ struct Option MuttVars[] = {
** .pp
** Also see the $$force_name variable.
*/
+ { "send_group_reply_to", DT_BOOL, R_NONE, OPT_SENDGROUP_REPLYTO, 0 },
+ /*
+ ** .pp
+ ** This variable controls how group replies are done.
+ ** When set, all recepients listet in "To:" are set in the
+ ** "To:" header again, else in the "CC", which is the default.
+ */
{ "score", DT_BOOL, R_NONE, OPT_SCORE, 1 },
/*
** .pp
--- options.h
+++ options.h 2017-09-11 11:37:05.418065746 +0000
@@ -160,6 +160,7 @@ enum GlobalBool
OPT_SAVE_ADDRESS,
OPT_SAVE_EMPTY,
OPT_SAVE_NAME,
+ OPT_SENDGROUP_REPLYTO,
OPT_SCORE,
#ifdef USE_SIDEBAR
OPT_SIDEBAR_VISIBLE,
--- send.c
+++ send.c 2017-09-11 11:37:26.009687657 +0000
@@ -637,8 +637,16 @@ int mutt_fetch_recips(struct Envelope *o
if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != MUTT_YES))
{
/* if(!mutt_addr_is_user(in->to)) */
- rfc822_append(&out->cc, in->to, 1);
- rfc822_append(&out->cc, in->cc, 1);
+ if (option (OPT_SENDGROUP_REPLYTO))
+ {
+ rfc822_append(&out->to, in->to, 0);
+ rfc822_append(&out->cc, in->cc, 1);
+ }
+ else
+ {
+ rfc822_append(&out->cc, in->to, 1);
+ rfc822_append(&out->cc, in->cc, 1);
+ }
}
}
return 0;