Diffstat (limited to 'noncore/net/mail/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/smtpwrapper.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
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 @@ -696,12 +696,15 @@ 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/"); MBOXwrapper*wrap = new MBOXwrapper(localfolders); if (!wrap) { qDebug("memory error"); - return; + return false; } QList<RecMail> mailsToSend; @@ -711,5 +714,5 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) if (mailsToSend.count()==0) { delete wrap; - return; + return false; } mailsToSend.setAutoDelete(false); @@ -723,4 +726,6 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) QMessageBox::critical(0,tr("Error sending mail"), tr("Error sending queued mail - breaking")); + + returnValue = false; break; } @@ -735,3 +740,5 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) mailsToSend.setAutoDelete(true); delete wrap; + return returnValue; + } |