author | alwin <alwin> | 2004-01-08 02:52:13 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-08 02:52:13 (UTC) |
commit | 05d47b2603adfab0e16f7395e34b7aa56ce6d8de (patch) (side-by-side diff) | |
tree | 4253654acb70b859fd0d32981132dffd35092b9f /noncore/net/mail/libmailwrapper/abstractmail.cpp | |
parent | dfa1477a28ecd90e08cf09aeecbe816e94bec0b5 (diff) | |
download | opie-05d47b2603adfab0e16f7395e34b7aa56ce6d8de.zip opie-05d47b2603adfab0e16f7395e34b7aa56ce6d8de.tar.gz opie-05d47b2603adfab0e16f7395e34b7aa56ce6d8de.tar.bz2 |
move/copy mails to another folder resides inside wrappers so we can
use special funs of libetpan and/or mailserver itself (eg. imap)
libetpan 0.32 requires for that feature a patch! (see libetpanstuff/)
accounts marked as "offline" get a new icon
TODO:
- when creating a new folder while copy/move on imap-server, get the
real resulting foldername when using prefix
- implement usage of copy/move inside one mbox using special etpan funs
Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 19 |
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 @@ -106 +106,20 @@ 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); + } +} |