-rw-r--r-- | noncore/net/mail/opiemail.cpp | 19 |
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,9 +1,11 @@ | |||
1 | #include <qmessagebox.h> | ||
1 | #include "opiemail.h" | 2 | #include "opiemail.h" |
2 | #include "editaccounts.h" | 3 | #include "editaccounts.h" |
3 | #include "composemail.h" | 4 | #include "composemail.h" |
5 | #include "smtpwrapper.h" | ||
4 | 6 | ||
5 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | 7 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) |
6 | : MainWindow( parent, name, flags ) | 8 | : MainWindow( parent, name, flags ) |
7 | { | 9 | { |
8 | settings = new Settings(); | 10 | settings = new Settings(); |
9 | 11 | ||
@@ -25,12 +27,29 @@ void OpieMail::slotComposeMail() | |||
25 | compose.exec(); | 27 | compose.exec(); |
26 | } | 28 | } |
27 | 29 | ||
28 | void OpieMail::slotSendQueued() | 30 | void OpieMail::slotSendQueued() |
29 | { | 31 | { |
30 | qDebug( "Send Queued" ); | 32 | qDebug( "Send Queued" ); |
33 | SMTPaccount *smtp = 0; | ||
34 | |||
35 | QList<Account> list = settings->getAccounts(); | ||
36 | Account *it; | ||
37 | // if (list.count()==1) { | ||
38 | for ( it = list.first(); it; it = list.next() ) { | ||
39 | if ( it->getType().compare( "SMTP" ) == 0 ) { | ||
40 | smtp = static_cast<SMTPaccount *>(it); | ||
41 | break; | ||
42 | } | ||
43 | } | ||
44 | // } | ||
45 | if (smtp) { | ||
46 | SMTPwrapper * wrap = new SMTPwrapper(settings); | ||
47 | wrap->flushOutbox(smtp); | ||
48 | QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); | ||
49 | } | ||
31 | } | 50 | } |
32 | 51 | ||
33 | void OpieMail::slotSearchMails() | 52 | void OpieMail::slotSearchMails() |
34 | { | 53 | { |
35 | qDebug( "Search Mails" ); | 54 | qDebug( "Search Mails" ); |
36 | } | 55 | } |