author | alwin <alwin> | 2004-01-08 14:04:54 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-08 14:04:54 (UTC) |
commit | ab6a32266c8fb625e782c601c9729af7f98904f6 (patch) (side-by-side diff) | |
tree | 1457c421109359bdaa50082f2640d33ac4d74cc2 /noncore/net/mail/libmailwrapper/imapwrapper.cpp | |
parent | b85bc4484bcc0a53557b4759c3e9e58dc9059138 (diff) | |
download | opie-ab6a32266c8fb625e782c601c9729af7f98904f6.zip opie-ab6a32266c8fb625e782c601c9729af7f98904f6.tar.gz opie-ab6a32266c8fb625e782c601c9729af7f98904f6.tar.bz2 |
- store single message to another folder implemented
- cleaned code in mainwindow and opiemail.cpp
Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 98634a3..4b633ea 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -1056,3 +1056,33 @@ void IMAPwrapper::mvcpAllMails(Folder*fromFolder,const QString&targetFolder,Abst deleteAllMail(fromFolder); } } + +void IMAPwrapper::mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) +{ + if (targetWrapper != this) { + qDebug("Using generic"); + AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); + return; + } + mailimap_set *set = 0; + login(); + if (!m_imap) { + return; + } + int err = selectMbox(mail.getMbox()); + if ( err != MAILIMAP_NO_ERROR ) { + return; + } + set = mailimap_set_new_single(mail.getNumber()); + err = mailimap_copy(m_imap,set,targetFolder.latin1()); + mailimap_set_free( set ); + if ( err != MAILIMAP_NO_ERROR ) { + QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); + Global::statusMessage(error_msg); + qDebug(error_msg); + return; + } + if (moveit) { + deleteMail(mail); + } +} |