summaryrefslogtreecommitdiff
authorgroucho <groucho>2003-04-15 08:07:53 (UTC)
committer groucho <groucho>2003-04-15 08:07:53 (UTC)
commitd0de397e46581f6ed5fcfad320b2b61be3858c5d (patch) (side-by-side diff)
tree1110503d72aa11947642a640ab50656f82c33a71
parente263613e83b64fa93b5f3c1b904715daf076cc78 (diff)
downloadopie-d0de397e46581f6ed5fcfad320b2b61be3858c5d.zip
opie-d0de397e46581f6ed5fcfad320b2b61be3858c5d.tar.gz
opie-d0de397e46581f6ed5fcfad320b2b61be3858c5d.tar.bz2
- SMTP fix preventing authorization with SMTP after POP
- removed debug output - smaller bug fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/addresslist.cpp2
-rw-r--r--noncore/net/mailit/emailclient.cpp8
-rw-r--r--noncore/net/mailit/emailhandler.cpp2
-rw-r--r--noncore/net/mailit/mailitwindow.cpp3
-rw-r--r--noncore/net/mailit/popclient.cpp10
-rw-r--r--noncore/net/mailit/readmail.cpp1
-rw-r--r--noncore/net/mailit/smtpclient.cpp20
-rw-r--r--noncore/unsupported/mailit/addresslist.cpp2
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp8
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp2
-rw-r--r--noncore/unsupported/mailit/mailitwindow.cpp3
-rw-r--r--noncore/unsupported/mailit/popclient.cpp10
-rw-r--r--noncore/unsupported/mailit/readmail.cpp1
-rw-r--r--noncore/unsupported/mailit/smtpclient.cpp20
14 files changed, 42 insertions, 50 deletions
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp
index 9fe558a..8d9ab91 100644
--- a/noncore/net/mailit/addresslist.cpp
+++ b/noncore/net/mailit/addresslist.cpp
@@ -128,5 +128,5 @@ void AddressList::read()
//oc=(OContact*) it;
if ((*it).defaultEmail().length()!=0)
- addContact((*it).defaultEmail(),(*it).fullName());
+ addContact((*it).defaultEmail(),(*it).fileAs());
}
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp
index 6612541..0d82a9a 100644
--- a/noncore/net/mailit/emailclient.cpp
+++ b/noncore/net/mailit/emailclient.cpp
@@ -533,5 +533,5 @@ void EmailClient::readMail()
QFile f(getPath(FALSE) + "inbox.txt");
// QFileInfo fi(f);
- qDebug( f.name());
+ //qDebug( f.name());
if ( f.open(IO_ReadOnly) ) { // file opened successfully
@@ -587,10 +587,10 @@ void EmailClient::saveMail(QString fileName, QListView *view)
}
item = (EmailListItem *) view->firstChild();
- qDebug (QString("Write : ") );
+ //qDebug (QString("Write : ") );
QTextStream t(&f);
while (item != NULL) {
mail = item->getMail();
- qDebug(mail->rawMail);
- qDebug(mail->recipients.first());
+ //qDebug(mail->rawMail);
+ //qDebug(mail->recipients.first());
t << mail->rawMail;
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp
index 9c1c814..03f8a28 100644
--- a/noncore/net/mailit/emailhandler.cpp
+++ b/noncore/net/mailit/emailhandler.cpp
@@ -164,6 +164,4 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
if (in.right(temp.length()) != temp) {
- qWarning(in.right(temp.length()));
- qWarning(" . added at end of email as separator");
mail->rawMail += temp;
}
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp
index fd49c1f..2bf1dcb 100644
--- a/noncore/net/mailit/mailitwindow.cpp
+++ b/noncore/net/mailit/mailitwindow.cpp
@@ -28,9 +28,7 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
setCentralWidget(views);
- qWarning("***Starting writeMail");
emailClient = new EmailClient(views, "client");
writeMail = new WriteMail(views, "writing");
readMail = new ReadMail(views, "reading");
- qWarning("***Finished readMail");
views->raiseWidget(emailClient);
@@ -61,5 +59,4 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
viewingMail = FALSE;
- qWarning("***Finished MailitWindow");
}
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp
index 2f14ed2..f9cc337 100644
--- a/noncore/net/mailit/popclient.cpp
+++ b/noncore/net/mailit/popclient.cpp
@@ -120,5 +120,5 @@ void PopClient::incomingData()
response = socket->readLine();
- qDebug(response +" %d", status);
+ //qDebug(response +" %d", status);
switch(status) {
@@ -132,5 +132,5 @@ void PopClient::incomingData()
timeStamp = response.mid( start , end - start + 1);
md5Source = timeStamp + popPassword;
- qDebug( md5Source);
+ //qDebug( md5Source);
// for( int i = 0; i < md5Source.length(); i++) {
// buff[i] = (QChar)md5Source[i];
@@ -193,5 +193,5 @@ void PopClient::incomingData()
if (newMessages < lastSync)
lastSync = 0;
- messageCount = lastSync + 1;
+ messageCount = 1;
}
@@ -241,5 +241,5 @@ void PopClient::incomingData()
status = Retr;
} else {
- qWarning(response);
+ //qWarning(response);
errorHandling(ErrUnknownResponse);
}
@@ -287,5 +287,5 @@ void PopClient::incomingData()
emit newMessage(message, messageCount-1, mailSize, TRUE);
} else { //incomplete mail downloaded
- emit newMessage(message, messageCount-1, mailSize, FALSE);
+ emit newMessage(message, messageCount-1, mailSize, FALSE);
}
if (messageCount > newMessages) //that was the last message
diff --git a/noncore/net/mailit/readmail.cpp b/noncore/net/mailit/readmail.cpp
index a5e7147..7cd3e09 100644
--- a/noncore/net/mailit/readmail.cpp
+++ b/noncore/net/mailit/readmail.cpp
@@ -90,4 +90,5 @@ void ReadMail::init()
emailView = new QTextView( this, "emailView" );
+
setCentralWidget(emailView);
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp
index 6699a90..b2e38e5 100644
--- a/noncore/net/mailit/smtpclient.cpp
+++ b/noncore/net/mailit/smtpclient.cpp
@@ -88,5 +88,5 @@ void SmtpClient::incomingData()
response = socket->readLine();
- qDebug(response);
+ //qDebug(response);
switch(status) {
@@ -96,5 +96,5 @@ void SmtpClient::incomingData()
mailPtr = mailList.first();
*stream << "HELO there\r\n";
- qDebug("HELO");
+ //qDebug("HELO");
} else errorHandling(ErrUnknownResponse);
break;
@@ -102,7 +102,7 @@ void SmtpClient::incomingData()
case From: {
if (response[0] == '2') {
- *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n";
+ *stream << "MAIL FROM: " << mailPtr->from << "\r\n";
status = Recv;
- qDebug("MAIL FROM: "+mailPtr->from);
+ //qDebug("MAIL FROM: "+mailPtr->from);
} else errorHandling(ErrUnknownResponse);
break;
@@ -113,6 +113,6 @@ void SmtpClient::incomingData()
if (it == NULL)
errorHandling(ErrUnknownResponse);
- *stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ *stream << "RCPT TO: " << *it << ">\r\n";
+ //qDebug("RCPT TO: "+ *it);
status = MRcv;
} else errorHandling(ErrUnknownResponse);
@@ -124,5 +124,5 @@ void SmtpClient::incomingData()
if ( it != mailPtr->to.end() ) {
*stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ //qDebug("RCPT TO: "+ *it);
break;
} else {
@@ -135,5 +135,5 @@ void SmtpClient::incomingData()
*stream << "DATA\r\n";
status = Body;
- qDebug("DATA");
+ //qDebug("DATA");
emit updateStatus(tr("Sending: ") + mailPtr->subject);
} else errorHandling(ErrUnknownResponse);
@@ -149,5 +149,5 @@ void SmtpClient::incomingData()
status = Quit;
}
- qDebug("BODY");
+ //qDebug("BODY");
} else errorHandling(ErrUnknownResponse);
break;
@@ -164,5 +164,5 @@ void SmtpClient::incomingData()
sending = FALSE;
socket->close();
- qDebug("QUIT");
+ //qDebug("QUIT");
} else errorHandling(ErrUnknownResponse);
break;
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp
index 9fe558a..8d9ab91 100644
--- a/noncore/unsupported/mailit/addresslist.cpp
+++ b/noncore/unsupported/mailit/addresslist.cpp
@@ -128,5 +128,5 @@ void AddressList::read()
//oc=(OContact*) it;
if ((*it).defaultEmail().length()!=0)
- addContact((*it).defaultEmail(),(*it).fullName());
+ addContact((*it).defaultEmail(),(*it).fileAs());
}
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 6612541..0d82a9a 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -533,5 +533,5 @@ void EmailClient::readMail()
QFile f(getPath(FALSE) + "inbox.txt");
// QFileInfo fi(f);
- qDebug( f.name());
+ //qDebug( f.name());
if ( f.open(IO_ReadOnly) ) { // file opened successfully
@@ -587,10 +587,10 @@ void EmailClient::saveMail(QString fileName, QListView *view)
}
item = (EmailListItem *) view->firstChild();
- qDebug (QString("Write : ") );
+ //qDebug (QString("Write : ") );
QTextStream t(&f);
while (item != NULL) {
mail = item->getMail();
- qDebug(mail->rawMail);
- qDebug(mail->recipients.first());
+ //qDebug(mail->rawMail);
+ //qDebug(mail->recipients.first());
t << mail->rawMail;
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 9c1c814..03f8a28 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -164,6 +164,4 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
if (in.right(temp.length()) != temp) {
- qWarning(in.right(temp.length()));
- qWarning(" . added at end of email as separator");
mail->rawMail += temp;
}
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp
index fd49c1f..2bf1dcb 100644
--- a/noncore/unsupported/mailit/mailitwindow.cpp
+++ b/noncore/unsupported/mailit/mailitwindow.cpp
@@ -28,9 +28,7 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
setCentralWidget(views);
- qWarning("***Starting writeMail");
emailClient = new EmailClient(views, "client");
writeMail = new WriteMail(views, "writing");
readMail = new ReadMail(views, "reading");
- qWarning("***Finished readMail");
views->raiseWidget(emailClient);
@@ -61,5 +59,4 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
viewingMail = FALSE;
- qWarning("***Finished MailitWindow");
}
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp
index 2f14ed2..f9cc337 100644
--- a/noncore/unsupported/mailit/popclient.cpp
+++ b/noncore/unsupported/mailit/popclient.cpp
@@ -120,5 +120,5 @@ void PopClient::incomingData()
response = socket->readLine();
- qDebug(response +" %d", status);
+ //qDebug(response +" %d", status);
switch(status) {
@@ -132,5 +132,5 @@ void PopClient::incomingData()
timeStamp = response.mid( start , end - start + 1);
md5Source = timeStamp + popPassword;
- qDebug( md5Source);
+ //qDebug( md5Source);
// for( int i = 0; i < md5Source.length(); i++) {
// buff[i] = (QChar)md5Source[i];
@@ -193,5 +193,5 @@ void PopClient::incomingData()
if (newMessages < lastSync)
lastSync = 0;
- messageCount = lastSync + 1;
+ messageCount = 1;
}
@@ -241,5 +241,5 @@ void PopClient::incomingData()
status = Retr;
} else {
- qWarning(response);
+ //qWarning(response);
errorHandling(ErrUnknownResponse);
}
@@ -287,5 +287,5 @@ void PopClient::incomingData()
emit newMessage(message, messageCount-1, mailSize, TRUE);
} else { //incomplete mail downloaded
- emit newMessage(message, messageCount-1, mailSize, FALSE);
+ emit newMessage(message, messageCount-1, mailSize, FALSE);
}
if (messageCount > newMessages) //that was the last message
diff --git a/noncore/unsupported/mailit/readmail.cpp b/noncore/unsupported/mailit/readmail.cpp
index a5e7147..7cd3e09 100644
--- a/noncore/unsupported/mailit/readmail.cpp
+++ b/noncore/unsupported/mailit/readmail.cpp
@@ -90,4 +90,5 @@ void ReadMail::init()
emailView = new QTextView( this, "emailView" );
+
setCentralWidget(emailView);
diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp
index 6699a90..b2e38e5 100644
--- a/noncore/unsupported/mailit/smtpclient.cpp
+++ b/noncore/unsupported/mailit/smtpclient.cpp
@@ -88,5 +88,5 @@ void SmtpClient::incomingData()
response = socket->readLine();
- qDebug(response);
+ //qDebug(response);
switch(status) {
@@ -96,5 +96,5 @@ void SmtpClient::incomingData()
mailPtr = mailList.first();
*stream << "HELO there\r\n";
- qDebug("HELO");
+ //qDebug("HELO");
} else errorHandling(ErrUnknownResponse);
break;
@@ -102,7 +102,7 @@ void SmtpClient::incomingData()
case From: {
if (response[0] == '2') {
- *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n";
+ *stream << "MAIL FROM: " << mailPtr->from << "\r\n";
status = Recv;
- qDebug("MAIL FROM: "+mailPtr->from);
+ //qDebug("MAIL FROM: "+mailPtr->from);
} else errorHandling(ErrUnknownResponse);
break;
@@ -113,6 +113,6 @@ void SmtpClient::incomingData()
if (it == NULL)
errorHandling(ErrUnknownResponse);
- *stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ *stream << "RCPT TO: " << *it << ">\r\n";
+ //qDebug("RCPT TO: "+ *it);
status = MRcv;
} else errorHandling(ErrUnknownResponse);
@@ -124,5 +124,5 @@ void SmtpClient::incomingData()
if ( it != mailPtr->to.end() ) {
*stream << "RCPT TO: <" << *it << ">\r\n";
- qDebug("RCPT TO: "+ *it);
+ //qDebug("RCPT TO: "+ *it);
break;
} else {
@@ -135,5 +135,5 @@ void SmtpClient::incomingData()
*stream << "DATA\r\n";
status = Body;
- qDebug("DATA");
+ //qDebug("DATA");
emit updateStatus(tr("Sending: ") + mailPtr->subject);
} else errorHandling(ErrUnknownResponse);
@@ -149,5 +149,5 @@ void SmtpClient::incomingData()
status = Quit;
}
- qDebug("BODY");
+ //qDebug("BODY");
} else errorHandling(ErrUnknownResponse);
break;
@@ -164,5 +164,5 @@ void SmtpClient::incomingData()
sending = FALSE;
socket->close();
- qDebug("QUIT");
+ //qDebug("QUIT");
} else errorHandling(ErrUnknownResponse);
break;