Make sure an imap sent mail folder is properly kept open during move of

the message from the local sent mail (where it is placed for fallback) to
the imap folder by using a KMMoveCommand, which nicely encapsulates all
that. This avoids the folder constantly opening and closing during
processing of incoming data which makes KMail appear hung and consumes
massive amounts of cpu.

Ferdinand, can you confirm this fixes it?

CCMAIL: 84215-done@bugs.kde.org

svn path=/trunk/kdepim/; revision=333060
wilder-work
Till Adam 22 years ago
parent 90dc9dcc7e
commit 83697f5097
  1. 7
      kmsender.cpp

@ -35,6 +35,7 @@ using namespace KMime::Types;
#include "kmmsgdict.h"
#include "kmmsgpart.h"
#include "protocols.h"
#include "kmcommands.h"
#include <mimelib/mediatyp.h>
#define SENDER_GROUP "sending mail"
@ -349,7 +350,11 @@ void KMSender::doSendMsg()
cleanup();
return;
}
if (imapSentFolder) imapSentFolder->moveMsg(mCurrentMsg);
if (imapSentFolder) {
// Does proper folder refcounting and message locking
KMCommand *command = new KMMoveCommand( imapSentFolder, mCurrentMsg );
command->start();
}
default:
break;
}

Loading…
Cancel
Save