summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/abstractmail.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp
index 3dd2fce..4b4c728 100644
--- a/noncore/net/mail/libmailwrapper/abstractmail.cpp
+++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp
@@ -104,3 +104,22 @@ QString AbstractMail::defaultLocalfolder()
void AbstractMail::deleteMails(const QString &,QList<RecMail> &)
{
}
+
+void AbstractMail::mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit)
+{
+ QList<RecMail> t;
+ listMessages(fromFolder->getName(),t);
+ encodedString*st = 0;
+ while (t.count()>0) {
+ RecMail*r = t.at(0);
+ st = fetchRawBody(*r);
+ if (st) {
+ targetWrapper->storeMessage(st->Content(),st->Length(),targetFolder);
+ delete st;
+ }
+ t.removeFirst();
+ }
+ if (moveit) {
+ deleteAllMail(fromFolder);
+ }
+}