summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.h
authorzautrix <zautrix>2004-07-03 16:33:12 (UTC)
committer zautrix <zautrix>2004-07-03 16:33:12 (UTC)
commite3b89230f065c48c84b48c88edb6eb088374c487 (patch) (unidiff)
tree162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/libmailwrapper/smtpwrapper.h
parent2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff)
downloadkdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2
Initial revision
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.h b/kmicromail/libmailwrapper/smtpwrapper.h
new file mode 100644
index 0000000..6c5bbe8
--- a/dev/null
+++ b/kmicromail/libmailwrapper/smtpwrapper.h
@@ -0,0 +1,63 @@
1// -*- Mode: C++; -*-
2#ifndef SMTPwrapper_H
3#define SMTPwrapper_H
4
5#include <qpe/applnk.h>
6
7#include <qbitarray.h>
8#include <qdatetime.h>
9#include <libetpan/clist.h>
10
11#include "settings.h"
12#include "generatemail.h"
13
14#include <opie2/osmartpointer.h>
15
16class SMTPaccount;
17class AbstractMail;
18
19class SMTPwrapper : public Generatemail
20{
21 Q_OBJECT
22
23public:
24 SMTPwrapper(SMTPaccount * aSmtp);
25 virtual ~SMTPwrapper();
26 void sendMail(const Opie::Core::OSmartPointer<Mail>& mail,bool later=false );
27 bool flushOutbox();
28
29 static progressMailSend*sendProgress;
30
31signals:
32 void queuedMails( int );
33
34protected:
35 mailsmtp *m_smtp;
36 SMTPaccount * m_SmtpAccount;
37
38 void connect_server();
39 void disc_server();
40 int start_smtp_tls();
41
42
43 void smtpSend( mailmime *mail,bool later);
44
45 static void storeMail(const char*mail, size_t length, const QString&box);
46 static QString mailsmtpError( int err );
47 static void progress( size_t current, size_t maximum );
48
49 int smtpSend(char*from,clist*rcpts,const char*data,size_t size);
50
51 void storeMail(mailmime*mail, const QString&box);
52
53 int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer<RecMail>&which);
54 void storeFailedMail(const char*data,unsigned int size, const char*failuremessage);
55
56 int m_queuedMail;
57
58protected slots:
59 void emitQCop( int queued );
60
61};
62
63#endif