author | harlekin <harlekin> | 2003-12-24 10:52:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-24 10:52:13 (UTC) |
commit | d128e2686193fb52bad638317e6f29a1b75a1db4 (patch) (unidiff) | |
tree | c53199fd367577dd0a7ac43e9fad293e92de2607 /noncore/net | |
parent | ff20f6d33cffd84222029df9f118a9e5db5ec3e5 (diff) | |
download | opie-d128e2686193fb52bad638317e6f29a1b75a1db4.zip opie-d128e2686193fb52bad638317e6f29a1b75a1db4.tar.gz opie-d128e2686193fb52bad638317e6f29a1b75a1db4.tar.bz2 |
only show the mail queue flushed dialogbox when successfull -)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 15 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 3 | ||||
-rw-r--r-- | noncore/net/mail/smtpwrapper.cpp | 15 | ||||
-rw-r--r-- | noncore/net/mail/smtpwrapper.h | 2 |
5 files changed, 26 insertions, 11 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index 770e2b8..a7e4837 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -697,5 +697,8 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
697 | /* this is a special fun */ | 697 | /* this is a special fun */ |
698 | void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | 698 | bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) |
699 | { | 699 | { |
700 | if (!smtp) return; | 700 | bool returnValue = true; |
701 | |||
702 | if (!smtp) return false; | ||
703 | |||
701 | QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); | 704 | QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); |
@@ -704,3 +707,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
704 | qDebug("memory error"); | 707 | qDebug("memory error"); |
705 | return; | 708 | return false; |
706 | } | 709 | } |
@@ -712,3 +715,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
712 | delete wrap; | 715 | delete wrap; |
713 | return; | 716 | return false; |
714 | } | 717 | } |
@@ -724,2 +727,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
724 | tr("Error sending queued mail - breaking")); | 727 | tr("Error sending queued mail - breaking")); |
728 | |||
729 | returnValue = false; | ||
725 | break; | 730 | break; |
@@ -736,2 +741,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
736 | delete wrap; | 741 | delete wrap; |
742 | return returnValue; | ||
743 | |||
737 | } | 744 | } |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index baa353b..66180b7 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h | |||
@@ -30,3 +30,3 @@ public: | |||
30 | void sendMail(const Mail& mail,bool later=false ); | 30 | void sendMail(const Mail& mail,bool later=false ); |
31 | void flushOutbox(SMTPaccount*smtp); | 31 | bool flushOutbox(SMTPaccount*smtp); |
32 | 32 | ||
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 833cac2..0dede90 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp | |||
@@ -70,3 +70,3 @@ void OpieMail::slotSendQueued() | |||
70 | SMTPwrapper * wrap = new SMTPwrapper(settings); | 70 | SMTPwrapper * wrap = new SMTPwrapper(settings); |
71 | wrap->flushOutbox(smtp); | 71 | if ( wrap->flushOutbox(smtp) ) { |
72 | QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); | 72 | QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); |
@@ -74,2 +74,3 @@ void OpieMail::slotSendQueued() | |||
74 | } | 74 | } |
75 | } | ||
75 | 76 | ||
diff --git a/noncore/net/mail/smtpwrapper.cpp b/noncore/net/mail/smtpwrapper.cpp index 770e2b8..a7e4837 100644 --- a/noncore/net/mail/smtpwrapper.cpp +++ b/noncore/net/mail/smtpwrapper.cpp | |||
@@ -697,5 +697,8 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
697 | /* this is a special fun */ | 697 | /* this is a special fun */ |
698 | void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | 698 | bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) |
699 | { | 699 | { |
700 | if (!smtp) return; | 700 | bool returnValue = true; |
701 | |||
702 | if (!smtp) return false; | ||
703 | |||
701 | QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); | 704 | QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); |
@@ -704,3 +707,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
704 | qDebug("memory error"); | 707 | qDebug("memory error"); |
705 | return; | 708 | return false; |
706 | } | 709 | } |
@@ -712,3 +715,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
712 | delete wrap; | 715 | delete wrap; |
713 | return; | 716 | return false; |
714 | } | 717 | } |
@@ -724,2 +727,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
724 | tr("Error sending queued mail - breaking")); | 727 | tr("Error sending queued mail - breaking")); |
728 | |||
729 | returnValue = false; | ||
725 | break; | 730 | break; |
@@ -736,2 +741,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
736 | delete wrap; | 741 | delete wrap; |
742 | return returnValue; | ||
743 | |||
737 | } | 744 | } |
diff --git a/noncore/net/mail/smtpwrapper.h b/noncore/net/mail/smtpwrapper.h index baa353b..66180b7 100644 --- a/noncore/net/mail/smtpwrapper.h +++ b/noncore/net/mail/smtpwrapper.h | |||
@@ -30,3 +30,3 @@ public: | |||
30 | void sendMail(const Mail& mail,bool later=false ); | 30 | void sendMail(const Mail& mail,bool later=false ); |
31 | void flushOutbox(SMTPaccount*smtp); | 31 | bool flushOutbox(SMTPaccount*smtp); |
32 | 32 | ||