author | alwin <alwin> | 2003-12-14 17:33:16 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-14 17:33:16 (UTC) |
commit | 353e1da81b235d7798763bce76428fb473108fb6 (patch) (unidiff) | |
tree | e9b8f8cbe3ee37512a1c9fc0409185f4fb6c9883 /noncore/net/mail/libmailwrapper | |
parent | 87425f2b26c01cc9bcc9bfac21a707462b410f13 (diff) | |
download | opie-353e1da81b235d7798763bce76428fb473108fb6.zip opie-353e1da81b235d7798763bce76428fb473108fb6.tar.gz opie-353e1da81b235d7798763bce76428fb473108fb6.tar.bz2 |
- replied mails will get the flag answered
- text fix in preparing the message for a reply
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 30 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 4 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.h | 1 |
5 files changed, 37 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index 0a1719d..62e0715 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -23,4 +23,5 @@ public: | |||
23 | virtual QString fetchPart(const RecMail&mail,const RecPart&part)=0; | 23 | virtual QString fetchPart(const RecMail&mail,const RecPart&part)=0; |
24 | virtual void deleteMail(const RecMail&mail)=0; | 24 | virtual void deleteMail(const RecMail&mail)=0; |
25 | virtual void answeredMail(const RecMail&mail)=0; | ||
25 | 26 | ||
26 | static AbstractMail* getWrapper(IMAPaccount *a); | 27 | static AbstractMail* getWrapper(IMAPaccount *a); |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 912a412..b253b49 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -740,2 +740,32 @@ void IMAPwrapper::deleteMail(const RecMail&mail) | |||
740 | qDebug("Delete successfull %s",m_imap->imap_response); | 740 | qDebug("Delete successfull %s",m_imap->imap_response); |
741 | } | 741 | } |
742 | |||
743 | void IMAPwrapper::answeredMail(const RecMail&mail) | ||
744 | { | ||
745 | mailimap_flag_list*flist; | ||
746 | mailimap_set *set; | ||
747 | mailimap_store_att_flags * store_flags; | ||
748 | int err; | ||
749 | login(); | ||
750 | if (!m_imap) { | ||
751 | return; | ||
752 | } | ||
753 | const char *mb = mail.getMbox().latin1(); | ||
754 | err = mailimap_select( m_imap, (char*)mb); | ||
755 | if ( err != MAILIMAP_NO_ERROR ) { | ||
756 | qDebug("error selecting mailbox for mark: %s",m_imap->imap_response); | ||
757 | return; | ||
758 | } | ||
759 | flist = mailimap_flag_list_new_empty(); | ||
760 | mailimap_flag_list_add(flist,mailimap_flag_new_answered()); | ||
761 | store_flags = mailimap_store_att_flags_new_set_flags(flist); | ||
762 | set = mailimap_set_new_single(mail.getNumber()); | ||
763 | err = mailimap_store(m_imap,set,store_flags); | ||
764 | mailimap_set_free( set ); | ||
765 | mailimap_store_att_flags_free(store_flags); | ||
766 | |||
767 | if (err != MAILIMAP_NO_ERROR) { | ||
768 | qDebug("error marking mail: %s",m_imap->imap_response); | ||
769 | return; | ||
770 | } | ||
771 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 4f4d575..700d512 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -26,4 +26,5 @@ public: | |||
26 | virtual QString fetchPart(const RecMail&mail,const RecPart&part); | 26 | virtual QString fetchPart(const RecMail&mail,const RecPart&part); |
27 | virtual void deleteMail(const RecMail&mail); | 27 | virtual void deleteMail(const RecMail&mail); |
28 | virtual void answeredMail(const RecMail&mail); | ||
28 | 29 | ||
29 | static void imap_progress( size_t current, size_t maximum ); | 30 | static void imap_progress( size_t current, size_t maximum ); |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 5065d29..46c854b 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -288,2 +288,6 @@ void POP3wrapper::deleteMail(const RecMail&) | |||
288 | { | 288 | { |
289 | } | 289 | } |
290 | |||
291 | void POP3wrapper::answeredMail(const RecMail&) | ||
292 | { | ||
293 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index ef972c8..6ff8d62 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h | |||
@@ -21,4 +21,5 @@ public: | |||
21 | virtual QString fetchPart(const RecMail&mail,const RecPart&part); | 21 | virtual QString fetchPart(const RecMail&mail,const RecPart&part); |
22 | virtual void deleteMail(const RecMail&mail); | 22 | virtual void deleteMail(const RecMail&mail); |
23 | virtual void answeredMail(const RecMail&mail); | ||
23 | 24 | ||
24 | RecBody fetchBody( const RecMail &mail ); | 25 | RecBody fetchBody( const RecMail &mail ); |