summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
authorzautrix <zautrix>2004-10-18 10:57:05 (UTC)
committer zautrix <zautrix>2004-10-18 10:57:05 (UTC)
commita83b6694d2f80ec58f6eb88684897052c69276a0 (patch) (side-by-side diff)
tree4b20f33e874f035f54021638125ed293e4202613 /kmicromail/libmailwrapper
parent112db6c41265da5255a58424186d95d7a00b6ff0 (diff)
downloadkdepimpi-a83b6694d2f80ec58f6eb88684897052c69276a0.zip
kdepimpi-a83b6694d2f80ec58f6eb88684897052c69276a0.tar.gz
kdepimpi-a83b6694d2f80ec58f6eb88684897052c69276a0.tar.bz2
some mail imap changes
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index b0dd1b8..a6688ed 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -63,3 +63,3 @@ void IMAPwrapper::progress( QString m )
mProgrMess = m;
- mCurrent = 0;
+ mCurrent = 1;
return;
@@ -71,2 +71,3 @@ void IMAPwrapper::progress( QString m )
Global::statusMessage(mess);
+ qDebug("Progress %s %s", mess.latin1(), m.latin1());
qApp->processEvents();
@@ -235,2 +236,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
{
+
+ int tryAgain = 1;
+ while ( tryAgain >= 0 ) {
int err = MAILIMAP_NO_ERROR;
@@ -258,3 +262,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
}
-
+ progress( tr("Fetch "));
+ mMax = last;
+ //qDebug("last %d ", last);
Global::statusMessage(tr("Fetching header list"));
@@ -262,3 +268,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
/* the range has to start at 1!!! not with 0!!!! */
- set = mailimap_set_new_interval( 1, last );
+ //LR the access to web.de imap server is no working with value 1
+ qDebug("interval %d - %d ", tryAgain, last-1+tryAgain );
+ set = mailimap_set_new_interval( tryAgain, last );
fetchType = mailimap_fetch_type_new_fetch_att_list_empty();
@@ -276,2 +284,3 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
if ( err == MAILIMAP_NO_ERROR ) {
+ tryAgain = -1;
mailimap_msg_att * msg_att;
@@ -280,2 +289,3 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
++i;
+ //qDebug("iii %d ",i);
msg_att = (mailimap_msg_att*)current->data;
@@ -293,6 +303,13 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
} else {
+ --tryAgain;
+ --tryAgain;
+ if ( tryAgain < 0 )
Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response));
+ else
+ qDebug("try again... ");
}
+
if (result) mailimap_fetch_list_free(result);
}
+}
@@ -954,3 +971,3 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
mMax = count;
- //progress( tr("Delete"));
+ progress( tr("Delete"));