-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) /* this is a special fun */ -void SMTPwrapper::flushOutbox(SMTPaccount*smtp) +bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) { - if (!smtp) return; + bool returnValue = true; + + if (!smtp) return false; + QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); @@ -704,3 +707,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) qDebug("memory error"); - return; + return false; } @@ -712,3 +715,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) delete wrap; - return; + return false; } @@ -724,2 +727,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) tr("Error sending queued mail - breaking")); + + returnValue = false; break; @@ -736,2 +741,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) delete wrap; + return returnValue; + } 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: void sendMail(const Mail& mail,bool later=false ); - void flushOutbox(SMTPaccount*smtp); + bool flushOutbox(SMTPaccount*smtp); 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() SMTPwrapper * wrap = new SMTPwrapper(settings); - wrap->flushOutbox(smtp); + if ( wrap->flushOutbox(smtp) ) { QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); @@ -74,2 +74,3 @@ void OpieMail::slotSendQueued() } +} 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) /* this is a special fun */ -void SMTPwrapper::flushOutbox(SMTPaccount*smtp) +bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) { - if (!smtp) return; + bool returnValue = true; + + if (!smtp) return false; + QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); @@ -704,3 +707,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) qDebug("memory error"); - return; + return false; } @@ -712,3 +715,3 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) delete wrap; - return; + return false; } @@ -724,2 +727,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) tr("Error sending queued mail - breaking")); + + returnValue = false; break; @@ -736,2 +741,4 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) delete wrap; + return returnValue; + } 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: void sendMail(const Mail& mail,bool later=false ); - void flushOutbox(SMTPaccount*smtp); + bool flushOutbox(SMTPaccount*smtp); |