mutt.h     |  1 +
 postpone.c |  6 ++++++
 send.c     |  2 +-
 3 files changed, 8 insertions(+), 1 deletions(-)


# HG changeset patch
# User Michael Elkins <m...@sigpipe.org>
# Date 1380910935 0
# Branch HEAD
# Node ID 5654fb98d7ab4d6b581963e21ad2ef36f6d85f4a
# Parent  04c0cf885460b4a26a4743c45a1bd7f2847c7e91
When recalling a postponed message that does not have a x-mutt-fcc header
field, generate a default FCC just as we do for new messages.  If x-mutt-fcc is
present but empty, we assume that means the user does not want a copy.

closes #3653

diff --git a/mutt.h b/mutt.h
--- a/mutt.h
+++ b/mutt.h
@@ -298,6 +298,7 @@
 #define SENDMAILX      (1<<6)
 #define SENDKEY                (1<<7)
 #define SENDRESEND     (1<<8)
+#define SENDPOSTPONEDFCC       (1<<9) /* used by mutt_get_postponed() to 
signal that the x-mutt-fcc header field was present */
 
 /* flags to _mutt_select_file() */
 #define M_SEL_BUFFY    (1<<0)
diff --git a/postpone.c b/postpone.c
--- a/postpone.c
+++ b/postpone.c
@@ -329,6 +329,12 @@
       tmp->next = NULL;
       mutt_free_list (&tmp);
       tmp = next;
+     /* note that x-mutt-fcc was present.  we do this because we want to add a
+      * default fcc if the header was missing, but preserve the request of the
+      * user to not make a copy if the header field is present, but empty.
+      * see http://dev.mutt.org/trac/ticket/3653
+      */
+      code |= SENDPOSTPONEDFCC;
     }
     else if ((WithCrypto & APPLICATION_PGP)
              && (mutt_strncmp ("Pgp:", tmp->data, 4) == 0 /* this is generated
diff --git a/send.c b/send.c
--- a/send.c
+++ b/send.c
@@ -1516,7 +1516,7 @@
   /* specify a default fcc.  if we are in batchmode, only save a copy of
    * the message if the value of $copy is yes or ask-yes */
 
-  if (!fcc[0] && !(flags & (SENDPOSTPONED)) && (!(flags & SENDBATCH) || 
(quadoption (OPT_COPY) & 0x1)))
+  if (!fcc[0] && !(flags & (SENDPOSTPONEDFCC)) && (!(flags & SENDBATCH) || 
(quadoption (OPT_COPY) & 0x1)))
   {
     /* set the default FCC */
     if (!msg->env->from)

Reply via email to