Bug 148326 - [PATCH] MDN sent without asking when redirecting manually
Summary: [PATCH] MDN sent without asking when redirecting manually
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: MDN (show other bugs)
Version: 1.9.7
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
: 155519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-29 15:51 UTC by Sascha Hlusiak
Modified: 2015-04-12 09:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Hlusiak 2007-07-29 15:51:28 UTC
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;
Comment 1 Thomas McGuire 2008-01-12 17:36:01 UTC
*** Bug 155519 has been marked as a duplicate of this bug. ***
Comment 2 Thomas McGuire 2008-01-20 21:58:58 UTC
*** Bug 155519 has been marked as a duplicate of this bug. ***
Comment 3 Pavel Mendl 2008-07-07 12:10:33 UTC
Just to attract attention of fixing developer: this bug is about EITHER manual redirection EITHER filter initiated redirection (so read duplicate bug text too, please).
Comment 4 Dominik Tritscher 2009-04-05 11:10:11 UTC
I just checked this with kmail 1.11.90 from trunk. No MDN was send on redirect, but also no dialog was raised when setting the mdn policy to "ask".
Comment 5 Martin Koller 2009-08-17 19:34:07 UTC
maybe stupid question, but how can you manually redirect a message without selecting it - which already ask what to do with MDN ?

And on automatic redirection via a filter, where you do not read the mail being redirected, why do you expect to get a dialog ? You'll get the dialog for the mail you received. Maybe I don't understand the problem, though ...
Comment 6 Dominik Tritscher 2009-08-17 20:43:32 UTC
If you disable the message preview pane ( in Settings->Appearance->Layout), you can select a message without marking it as read.

And on the automatic redirection: MDNs are not only delivery notifcations, but also send on redirecting a mail. Therefore, if the MDN policy is set to ask, a user may expect a dialog asking if one should be sent.
Currently (using KDE 4.3), no MDNs are send when redirecting a mail, so the behaviour has changed.
Comment 7 Laurent Montel 2015-04-12 09:41:24 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.