[Bug 148326] New: kmail sends MDN without asking when redirecting manually

Sascha Hlusiak spam84 at gmx.de
Sun Jul 29 14:51:30 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=148326         
           Summary: kmail sends MDN without asking when redirecting manually
           Product: kmail
           Version: 1.9.7
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdepim-bugs kde org
        ReportedBy: spam84 gmx de


Version:           1.9.7 (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages

I have set kmail to "ask" me when it wants to send MDN messages. When redirecting a message manually using the menu entry, it sends a MDN message to the original sender, telling him that his message has been redirected. 

I expect a popup to come up for me to confirm sending the MDN. Setting kmail to ignore sending MDNs, it works fine. This is because in kmcommand.cpp it uses the KMFilterAction::sendMDN method, which does not allow a gui. I wrote the following patch, which does not work, but I guess the approach is correct. Please fix this.


--- kmcommands.cpp.old  2007-07-29 15:21:14.000000000 +0200
+++ kmcommands.cpp      2007-07-29 15:21:16.000000000 +0200
 @ -1421,8 +1421,12  @
   if (dlg.exec()==QDialog::Rejected) return Failed;

   KMMessage *newMsg = msg->createRedirect( dlg.to() );
-  KMFilterAction::sendMDN( msg, KMime::MDN::Dispatched );
-
+  if ( KMMessage * receipt = message()->createMDN( KMime::MDN::ManualAction,
+                                                  KMime::MDN::Dispatched,
+                                                  true /* allow GUI */ ) )
+    if ( !kmkernel->msgSender()->send( receipt ) ) // send or queue
+      {} // KMessageBox::error( this, i18n("Could not send MDN.") );
+
   const KMail::MessageSender::SendMethod method = dlg.sendImmediate()
     ? KMail::MessageSender::SendImmediate
     : KMail::MessageSender::SendLater;



More information about the Kdepim-bugs mailing list