author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/libmailwrapper/smtpwrapper.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 7c813cc..2df55ff 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp | |||
@@ -1,27 +1,29 @@ | |||
1 | #include "smtpwrapper.h" | 1 | #include "smtpwrapper.h" |
2 | #include "mailwrapper.h" | 2 | #include "mailwrapper.h" |
3 | #include "abstractmail.h" | 3 | #include "abstractmail.h" |
4 | #include "logindialog.h" | 4 | #include "logindialog.h" |
5 | #include "mailtypes.h" | 5 | #include "mailtypes.h" |
6 | #include "sendmailprogress.h" | 6 | #include "sendmailprogress.h" |
7 | 7 | ||
8 | //#include <opie2/odebug.h> | 8 | //#include <opie2/odebug.h> |
9 | //#include <qt.h> | 9 | //#include <qt.h> |
10 | #include <qapplication.h> | 10 | #include <qapplication.h> |
11 | #include <qmessagebox.h> | 11 | #include <qmessagebox.h> |
12 | //Added by qt3to4: | ||
13 | #include <Q3ValueList> | ||
12 | #include <stdlib.h> | 14 | #include <stdlib.h> |
13 | #ifndef DESKTOP_VERSION | 15 | #ifndef DESKTOP_VERSION |
14 | //#include <qpe/config.h> | 16 | //#include <qpe/config.h> |
15 | #include <qpe/qcopenvelope_qws.h> | 17 | #include <qpe/qcopenvelope_qws.h> |
16 | #endif | 18 | #endif |
17 | #include <libetpan/libetpan.h> | 19 | #include <libetpan/libetpan.h> |
18 | #include <klocale.h> | 20 | #include <klocale.h> |
19 | #include <kglobal.h> | 21 | #include <kglobal.h> |
20 | #include <kconfig.h> | 22 | #include <kconfig.h> |
21 | 23 | ||
22 | 24 | ||
23 | using namespace Opie::Core; | 25 | using namespace Opie::Core; |
24 | progressMailSend*SMTPwrapper::sendProgress = 0; | 26 | progressMailSend*SMTPwrapper::sendProgress = 0; |
25 | 27 | ||
26 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 28 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
27 | : Generatemail() | 29 | : Generatemail() |
@@ -421,34 +423,34 @@ bool SMTPwrapper::flushOutbox() { | |||
421 | bool returnValue = true; | 423 | bool returnValue = true; |
422 | 424 | ||
423 | ; // odebug << "Sending the queue" << oendl; | 425 | ; // odebug << "Sending the queue" << oendl; |
424 | if (!m_SmtpAccount) { | 426 | if (!m_SmtpAccount) { |
425 | ; // odebug << "No smtp account given" << oendl; | 427 | ; // odebug << "No smtp account given" << oendl; |
426 | return false; | 428 | return false; |
427 | } | 429 | } |
428 | 430 | ||
429 | bool reset_user_value = false; | 431 | bool reset_user_value = false; |
430 | QString localfolders = AbstractMail::defaultLocalfolder(); | 432 | QString localfolders = AbstractMail::defaultLocalfolder(); |
431 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); | 433 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); |
432 | if (!wrap) { | 434 | if (!wrap) { |
433 | ; // odebug << "memory error" << oendl; | 435 | ; // odebug << "memory error" << oendl; |
434 | return false; | 436 | return false; |
435 | } | 437 | } |
436 | QString oldPw, oldUser; | 438 | QString oldPw, oldUser; |
437 | QValueList<RecMailP> mailsToSend; | 439 | Q3ValueList<RecMailP> mailsToSend; |
438 | QValueList<RecMailP> mailsToRemove; | 440 | Q3ValueList<RecMailP> mailsToRemove; |
439 | QString mbox("Outgoing"); | 441 | QString mbox("Outgoing"); |
440 | wrap->listMessages(mbox,mailsToSend); | 442 | wrap->listMessages(mbox,mailsToSend); |
441 | if (mailsToSend.count()==0) { | 443 | if (mailsToSend.count()==0) { |
442 | delete wrap; | 444 | delete wrap; |
443 | ; // odebug << "No mails to send" << oendl; | 445 | ; // odebug << "No mails to send" << oendl; |
444 | return false; | 446 | return false; |
445 | } | 447 | } |
446 | 448 | ||
447 | oldPw = m_SmtpAccount->getPassword(); | 449 | oldPw = m_SmtpAccount->getPassword(); |
448 | oldUser = m_SmtpAccount->getUser(); | 450 | oldUser = m_SmtpAccount->getUser(); |
449 | if (m_SmtpAccount->getLogin() && (m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty()) ) { | 451 | if (m_SmtpAccount->getLogin() && (m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty()) ) { |
450 | // get'em | 452 | // get'em |
451 | QString user,pass; | 453 | QString user,pass; |
452 | LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true ); | 454 | LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true ); |
453 | login.show(); | 455 | login.show(); |
454 | if ( QDialog::Accepted == login.exec() ) { | 456 | if ( QDialog::Accepted == login.exec() ) { |