author | alwin <alwin> | 2003-12-22 02:37:35 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-22 02:37:35 (UTC) |
commit | 9e7aafdb7c76d29fee742d53131a73dd60aded2b (patch) (unidiff) | |
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) (show 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,8 +1,8 @@ | |||
1 | #include "mboxwrapper.h" | 1 | #include "mboxwrapper.h" |
2 | #include "mailtypes.h" | 2 | #include "mailtypes.h" |
3 | #include "mailwrapper.h" | 3 | #include "mailwrapper.h" |
4 | #include "libetpan/libetpan.h" | 4 | #include <libetpan/libetpan.h> |
5 | #include "libetpan/mailstorage.h" | 5 | #include <libetpan/mailstorage.h> |
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | 7 | ||
8 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) | 8 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) |
@@ -67,7 +67,6 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) | |||
67 | mail_flags * flag_result = 0; | 67 | mail_flags * flag_result = 0; |
68 | r = mailmessage_get_flags(msg,&flag_result); | 68 | r = mailmessage_get_flags(msg,&flag_result); |
69 | if (r == MAIL_ERROR_NOT_IMPLEMENTED) { | 69 | if (r == MAIL_ERROR_NOT_IMPLEMENTED) { |
70 | qDebug("flag fetching not implemented"); | ||
71 | mFlags.setBit(FLAG_SEEN); | 70 | mFlags.setBit(FLAG_SEEN); |
72 | } | 71 | } |
73 | mailimf_single_fields single_fields; | 72 | mailimf_single_fields single_fields; |
@@ -197,3 +196,24 @@ void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) | |||
197 | { | 196 | { |
198 | qDebug("MBOX %i von %i",current,maximum); | 197 | qDebug("MBOX %i von %i",current,maximum); |
199 | } | 198 | } |
199 | |||
200 | void MBOXwrapper::createFolder(const QString&) | ||
201 | { | ||
202 | } | ||
203 | |||
204 | void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folder) | ||
205 | { | ||
206 | QString p = MBOXPath+"/"; | ||
207 | p+=folder; | ||
208 | mailmbox_folder*f = 0; | ||
209 | int r = mailmbox_init(p.latin1(),0,1,0,&f); | ||
210 | if (r != MAIL_NO_ERROR) { | ||
211 | qDebug("Error init folder"); | ||
212 | return; | ||
213 | } | ||
214 | r = mailmbox_append_message(f,msg,length); | ||
215 | if (r != MAIL_NO_ERROR) { | ||
216 | qDebug("Error writing message folder"); | ||
217 | } | ||
218 | mailmbox_done(f); | ||
219 | } | ||