author | alwin <alwin> | 2003-12-22 02:37:35 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-22 02:37:35 (UTC) |
commit | 9e7aafdb7c76d29fee742d53131a73dd60aded2b (patch) (side-by-side diff) | |
tree | e98f9fe1233455f458738acbfd29bac78dd03342 /noncore/net/mail/mboxwrapper.cpp | |
parent | 7c016e1a75970cb7c28d70398ad20c708cdb452b (diff) | |
download | opie-9e7aafdb7c76d29fee742d53131a73dd60aded2b.zip opie-9e7aafdb7c76d29fee742d53131a73dd60aded2b.tar.gz opie-9e7aafdb7c76d29fee742d53131a73dd60aded2b.tar.bz2 |
- storing mails send in outgoing (if queued) or sent (if sent) folder
TODO: flush queue, cleanup SMTP code, select smtp-account if more than
one when flush the outgoing queue
Diffstat (limited to 'noncore/net/mail/mboxwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mboxwrapper.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/noncore/net/mail/mboxwrapper.cpp b/noncore/net/mail/mboxwrapper.cpp index 7581715..8117cef 100644 --- a/noncore/net/mail/mboxwrapper.cpp +++ b/noncore/net/mail/mboxwrapper.cpp @@ -1,9 +1,9 @@ #include "mboxwrapper.h" #include "mailtypes.h" #include "mailwrapper.h" -#include "libetpan/libetpan.h" -#include "libetpan/mailstorage.h" +#include <libetpan/libetpan.h> +#include <libetpan/mailstorage.h> #include <qdir.h> MBOXwrapper::MBOXwrapper(const QString & mbox_dir) : Genericwrapper(),MBOXPath(mbox_dir) @@ -66,9 +66,8 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mail->setWrapper(this); mail_flags * flag_result = 0; r = mailmessage_get_flags(msg,&flag_result); if (r == MAIL_ERROR_NOT_IMPLEMENTED) { - qDebug("flag fetching not implemented"); mFlags.setBit(FLAG_SEEN); } mailimf_single_fields single_fields; mailimf_single_fields_init(&single_fields, msg->msg_fields); @@ -196,4 +195,25 @@ RecBody MBOXwrapper::fetchBody( const RecMail &mail ) void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) { qDebug("MBOX %i von %i",current,maximum); } + +void MBOXwrapper::createFolder(const QString&) +{ +} + +void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folder) +{ + QString p = MBOXPath+"/"; + p+=folder; + mailmbox_folder*f = 0; + int r = mailmbox_init(p.latin1(),0,1,0,&f); + if (r != MAIL_NO_ERROR) { + qDebug("Error init folder"); + return; + } + r = mailmbox_append_message(f,msg,length); + if (r != MAIL_NO_ERROR) { + qDebug("Error writing message folder"); + } + mailmbox_done(f); +} |