Diffstat (limited to 'noncore/unsupported/mailit/emailhandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emailhandler.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp index 1be16d4..9c1c814 100644 --- a/noncore/unsupported/mailit/emailhandler.cpp +++ b/noncore/unsupported/mailit/emailhandler.cpp | |||
@@ -117,9 +117,9 @@ void EmailHandler::getMailHeaders() | |||
117 | popClient->removeSynchronize(); | 117 | popClient->removeSynchronize(); |
118 | } | 118 | } |
119 | 119 | ||
120 | headers = TRUE; | 120 | headers = TRUE; |
121 | popClient->headersOnly(headers, 2000); //less than 2000, download all | 121 | popClient->headersOnly(headers, mailAccount.syncLimit); //less than requested syncLimit, download all |
122 | popClient->newConnection(mailAccount.popServer, 110); | 122 | popClient->newConnection(mailAccount.popServer, 110); |
123 | } | 123 | } |
124 | 124 | ||
125 | void EmailHandler::getMailByList(MailList *mailList) | 125 | void EmailHandler::getMailByList(MailList *mailList) |
@@ -199,20 +199,29 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail) | |||
199 | mail->fromMail.truncate(mail->fromMail.length() - 1); | 199 | mail->fromMail.truncate(mail->fromMail.length() - 1); |
200 | mail->from=mail->fromMail; | 200 | mail->from=mail->fromMail; |
201 | } | 201 | } |
202 | } | 202 | } |
203 | |||
204 | //@@@ToDo: Rewrite the parser as To: stops at the first occurence- which is Delivered-To: | ||
205 | if (pos = p.find("TO",':', pos, TRUE) != -1) | ||
206 | { | ||
207 | pos++; | ||
208 | mail->recipients.append (p.getString(&pos, 'z', TRUE) ); | ||
209 | } | ||
210 | |||
211 | |||
212 | |||
203 | if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) { | 213 | if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) { |
204 | pos++; | 214 | pos++; |
205 | mail->subject = p.getString(&pos, 'z', TRUE); | 215 | mail->subject = p.getString(&pos, 'z', TRUE); |
206 | } | 216 | } |
207 | if ((pos = p.find("DATE",':', 0, TRUE)) != -1) { | 217 | if ((pos = p.find("DATE",':', 0, TRUE)) != -1) { |
208 | pos++; | 218 | pos++; |
209 | mail->date = p.getString(&pos, 'z', true); | 219 | mail->date = p.getString(&pos, 'z', true); |
210 | } | 220 | } |
211 | if ((pos = p.find("TO",':', 0, TRUE)) != -1) { | 221 | |
212 | pos++; | 222 | |
213 | mail->recipients.append (p.getString(&pos, 'z', TRUE) ); | 223 | |
214 | } | ||
215 | if ((pos = p.find("MESSAGE",'-', 0, TRUE)) != -1) { | 224 | if ((pos = p.find("MESSAGE",'-', 0, TRUE)) != -1) { |
216 | pos++; | 225 | pos++; |
217 | if ( (p.wordAt(pos).upper() == "ID") && | 226 | if ( (p.wordAt(pos).upper() == "ID") && |
218 | (p.separatorAt(pos) == ':') ) { | 227 | (p.separatorAt(pos) == ':') ) { |