author | alwin <alwin> | 2003-12-10 01:19:51 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-10 01:19:51 (UTC) |
commit | c244afea4a03d7ae948152b5abac2f059fb1e789 (patch) (unidiff) | |
tree | 74e9a6117c3c3854dd8f34cd5599dfb7fb185c86 /noncore | |
parent | 9a7db10da12232625be270feae5df761cfe11afa (diff) | |
download | opie-c244afea4a03d7ae948152b5abac2f059fb1e789.zip opie-c244afea4a03d7ae948152b5abac2f059fb1e789.tar.gz opie-c244afea4a03d7ae948152b5abac2f059fb1e789.tar.bz2 |
forgot the reply-to entry
-rw-r--r-- | noncore/net/mail/ProgrammersDoc/ReceivingMails.dia | bin | 3086 -> 3158 bytes | |||
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 29 | ||||
-rw-r--r-- | noncore/net/mail/imapwrapper.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 29 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.h | 5 | ||||
-rw-r--r-- | noncore/net/mail/mailtypes.h | 5 |
7 files changed, 42 insertions, 30 deletions
diff --git a/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia b/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia index 08c6434..2e3033e 100644 --- a/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia +++ b/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia | |||
Binary files differ | |||
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index 5ce140e..eae85a7 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -211,7 +211,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
211 | mailimap_msg_att_item *item=0; | 211 | mailimap_msg_att_item *item=0; |
212 | bool named_from = false; | 212 | clistcell *current,*c,*cf; |
213 | QString from,date,subject; | ||
214 | date = from = subject = ""; | ||
215 | clistcell *current,*c,*cf, *current_from = NULL; | ||
216 | mailimap_address * current_address = NULL; | ||
217 | mailimap_msg_att_dynamic*flist; | 213 | mailimap_msg_att_dynamic*flist; |
@@ -273,5 +269,5 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
273 | mailimap_envelope * head = item->msg_att_static->env; | 269 | mailimap_envelope * head = item->msg_att_static->env; |
274 | date = head->date; | ||
275 | subject = head->subject; | ||
276 | m = new RecMail(); | 270 | m = new RecMail(); |
271 | m->setDate(head->date); | ||
272 | m->setSubject(head->subject); | ||
277 | if (head->from!=NULL) { | 273 | if (head->from!=NULL) { |
@@ -279,3 +275,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
279 | if (addresslist.count()) { | 275 | if (addresslist.count()) { |
280 | from = addresslist.first(); | 276 | m->setFrom(addresslist.first()); |
281 | } | 277 | } |
@@ -294,9 +290,12 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
294 | } | 290 | } |
295 | m->setSubject(subject); | 291 | if (head->reply_to!=NULL) { |
296 | m->setFrom(from); | 292 | addresslist = address_list_to_stringlist(head->bcc->list); |
297 | m->setDate(date); | 293 | if (addresslist.count()) { |
294 | m->setReplyto(addresslist.first()); | ||
295 | } | ||
296 | } | ||
298 | m->setMsgid(QString(head->message_id)); | 297 | m->setMsgid(QString(head->message_id)); |
299 | qDebug("header: \nFrom: %s\nSubject: %s\nDate: %s\nMsgid: %s", | 298 | qDebug("header: \nFrom: %s\nSubject: %s\nDate: %s\nMsgid: %s", |
300 | from.latin1(), | 299 | m->getFrom().latin1(), |
301 | subject.latin1(),date.latin1(),m->Msgid().latin1()); | 300 | m->getSubject().latin1(),m->getDate().latin1(),m->Msgid().latin1()); |
302 | } else if (item->msg_att_static->type==MAILIMAP_MSG_ATT_INTERNALDATE) { | 301 | } else if (item->msg_att_static->type==MAILIMAP_MSG_ATT_INTERNALDATE) { |
@@ -441,2 +440,3 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
441 | current = clist_begin(list); | 440 | current = clist_begin(list); |
441 | unsigned int count = 0; | ||
442 | while (current!= NULL) { | 442 | while (current!= NULL) { |
@@ -465,2 +465,5 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
465 | l.append(QString(from)); | 465 | l.append(QString(from)); |
466 | if (++count > 99) { | ||
467 | break; | ||
468 | } | ||
466 | } | 469 | } |
diff --git a/noncore/net/mail/imapwrapper.h b/noncore/net/mail/imapwrapper.h index 6565896..faab43c 100644 --- a/noncore/net/mail/imapwrapper.h +++ b/noncore/net/mail/imapwrapper.h | |||
@@ -30,3 +30,3 @@ protected: | |||
30 | void fillPlainBody(const RecMail&mail,RecBody&target_body, mailimap_body_type_text * text_body); | 30 | void fillPlainBody(const RecMail&mail,RecBody&target_body, mailimap_body_type_text * text_body); |
31 | QStringList address_list_to_stringlist(clist*list); | 31 | static QStringList address_list_to_stringlist(clist*list); |
32 | 32 | ||
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 5ce140e..eae85a7 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -211,7 +211,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
211 | mailimap_msg_att_item *item=0; | 211 | mailimap_msg_att_item *item=0; |
212 | bool named_from = false; | 212 | clistcell *current,*c,*cf; |
213 | QString from,date,subject; | ||
214 | date = from = subject = ""; | ||
215 | clistcell *current,*c,*cf, *current_from = NULL; | ||
216 | mailimap_address * current_address = NULL; | ||
217 | mailimap_msg_att_dynamic*flist; | 213 | mailimap_msg_att_dynamic*flist; |
@@ -273,5 +269,5 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
273 | mailimap_envelope * head = item->msg_att_static->env; | 269 | mailimap_envelope * head = item->msg_att_static->env; |
274 | date = head->date; | ||
275 | subject = head->subject; | ||
276 | m = new RecMail(); | 270 | m = new RecMail(); |
271 | m->setDate(head->date); | ||
272 | m->setSubject(head->subject); | ||
277 | if (head->from!=NULL) { | 273 | if (head->from!=NULL) { |
@@ -279,3 +275,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
279 | if (addresslist.count()) { | 275 | if (addresslist.count()) { |
280 | from = addresslist.first(); | 276 | m->setFrom(addresslist.first()); |
281 | } | 277 | } |
@@ -294,9 +290,12 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
294 | } | 290 | } |
295 | m->setSubject(subject); | 291 | if (head->reply_to!=NULL) { |
296 | m->setFrom(from); | 292 | addresslist = address_list_to_stringlist(head->bcc->list); |
297 | m->setDate(date); | 293 | if (addresslist.count()) { |
294 | m->setReplyto(addresslist.first()); | ||
295 | } | ||
296 | } | ||
298 | m->setMsgid(QString(head->message_id)); | 297 | m->setMsgid(QString(head->message_id)); |
299 | qDebug("header: \nFrom: %s\nSubject: %s\nDate: %s\nMsgid: %s", | 298 | qDebug("header: \nFrom: %s\nSubject: %s\nDate: %s\nMsgid: %s", |
300 | from.latin1(), | 299 | m->getFrom().latin1(), |
301 | subject.latin1(),date.latin1(),m->Msgid().latin1()); | 300 | m->getSubject().latin1(),m->getDate().latin1(),m->Msgid().latin1()); |
302 | } else if (item->msg_att_static->type==MAILIMAP_MSG_ATT_INTERNALDATE) { | 301 | } else if (item->msg_att_static->type==MAILIMAP_MSG_ATT_INTERNALDATE) { |
@@ -441,2 +440,3 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
441 | current = clist_begin(list); | 440 | current = clist_begin(list); |
441 | unsigned int count = 0; | ||
442 | while (current!= NULL) { | 442 | while (current!= NULL) { |
@@ -465,2 +465,5 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
465 | l.append(QString(from)); | 465 | l.append(QString(from)); |
466 | if (++count > 99) { | ||
467 | break; | ||
468 | } | ||
466 | } | 469 | } |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 6565896..faab43c 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -30,3 +30,3 @@ protected: | |||
30 | void fillPlainBody(const RecMail&mail,RecBody&target_body, mailimap_body_type_text * text_body); | 30 | void fillPlainBody(const RecMail&mail,RecBody&target_body, mailimap_body_type_text * text_body); |
31 | QStringList address_list_to_stringlist(clist*list); | 31 | static QStringList address_list_to_stringlist(clist*list); |
32 | 32 | ||
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index c8d533a..6d6b080 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h | |||
@@ -46,2 +46,5 @@ public: | |||
46 | const QString&Msgid()const{return msg_id;} | 46 | const QString&Msgid()const{return msg_id;} |
47 | void setReplyto(const QString&reply){replyto=reply;} | ||
48 | const QString&Replyto()const{return replyto;} | ||
49 | |||
47 | 50 | ||
@@ -57,3 +60,3 @@ public: | |||
57 | protected: | 60 | protected: |
58 | QString subject,date,from,mbox,msg_id; | 61 | QString subject,date,from,mbox,msg_id,replyto; |
59 | int msg_number; | 62 | int msg_number; |
diff --git a/noncore/net/mail/mailtypes.h b/noncore/net/mail/mailtypes.h index c8d533a..6d6b080 100644 --- a/noncore/net/mail/mailtypes.h +++ b/noncore/net/mail/mailtypes.h | |||
@@ -46,2 +46,5 @@ public: | |||
46 | const QString&Msgid()const{return msg_id;} | 46 | const QString&Msgid()const{return msg_id;} |
47 | void setReplyto(const QString&reply){replyto=reply;} | ||
48 | const QString&Replyto()const{return replyto;} | ||
49 | |||
47 | 50 | ||
@@ -57,3 +60,3 @@ public: | |||
57 | protected: | 60 | protected: |
58 | QString subject,date,from,mbox,msg_id; | 61 | QString subject,date,from,mbox,msg_id,replyto; |
59 | int msg_number; | 62 | int msg_number; |