summaryrefslogtreecommitdiff
path: root/noncore/net/mail/opiemail.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 7ab4e0d..9257866 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -1 +1,2 @@
+#include <qmessagebox.h>
#include "opiemail.h"
@@ -3,2 +4,3 @@
#include "composemail.h"
+#include "smtpwrapper.h"
@@ -30,2 +32,19 @@ void OpieMail::slotSendQueued()
qDebug( "Send Queued" );
+ SMTPaccount *smtp = 0;
+
+ QList<Account> list = settings->getAccounts();
+ Account *it;
+// if (list.count()==1) {
+ for ( it = list.first(); it; it = list.next() ) {
+ if ( it->getType().compare( "SMTP" ) == 0 ) {
+ smtp = static_cast<SMTPaccount *>(it);
+ break;
+ }
+ }
+// }
+ if (smtp) {
+ SMTPwrapper * wrap = new SMTPwrapper(settings);
+ wrap->flushOutbox(smtp);
+ QMessageBox::information(0,tr("Info"),tr("Mail queue flushed"));
+ }
}