Pass crypto mails through write depending on state
authorAndre Heinecke <aheinecke@gnupg.org>
Thu, 11 Apr 2019 12:44:06 +0000 (14:44 +0200)
committerAndre Heinecke <aheinecke@gnupg.org>
Thu, 11 Apr 2019 12:44:06 +0000 (14:44 +0200)
* src/mailitem-events.cpp (Write): Pass encrypted mails
when the state is Mail::WantsSendMIME.

src/mailitem-events.cpp

index 08cdf17..76c73ec 100644 (file)
@@ -642,6 +642,12 @@ EVENT_SINK_INVOKE(MailItemEvents)
                   /* Passing write to trigger encrypt in after write */
                   TBREAK;
                 }
+              if (m_mail->cryptState() == Mail::WantsSendMIME)
+                {
+                  log_debug ("%s:%s: Mail wants send mime. Passing.",
+                             SRCNAME, __func__);
+                  TBREAK;
+                }
 
               Mail *last_mail = Mail::getLastMail ();
               if (Mail::isValidPtr (last_mail))