author | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
commit | e3b89230f065c48c84b48c88edb6eb088374c487 (patch) (side-by-side diff) | |
tree | 162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/libmailwrapper/smtpwrapper.h | |
parent | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff) | |
download | kdepimpi-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.h | 63 |
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 @@ +// -*- Mode: C++; -*- +#ifndef SMTPwrapper_H +#define SMTPwrapper_H + +#include <qpe/applnk.h> + +#include <qbitarray.h> +#include <qdatetime.h> +#include <libetpan/clist.h> + +#include "settings.h" +#include "generatemail.h" + +#include <opie2/osmartpointer.h> + +class SMTPaccount; +class AbstractMail; + +class SMTPwrapper : public Generatemail +{ + Q_OBJECT + +public: + SMTPwrapper(SMTPaccount * aSmtp); + virtual ~SMTPwrapper(); + void sendMail(const Opie::Core::OSmartPointer<Mail>& mail,bool later=false ); + bool flushOutbox(); + + static progressMailSend*sendProgress; + +signals: + void queuedMails( int ); + +protected: + mailsmtp *m_smtp; + SMTPaccount * m_SmtpAccount; + + void connect_server(); + void disc_server(); + int start_smtp_tls(); + + + void smtpSend( mailmime *mail,bool later); + + static void storeMail(const char*mail, size_t length, const QString&box); + static QString mailsmtpError( int err ); + static void progress( size_t current, size_t maximum ); + + int smtpSend(char*from,clist*rcpts,const char*data,size_t size); + + void storeMail(mailmime*mail, const QString&box); + + int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer<RecMail>&which); + void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); + + int m_queuedMail; + +protected slots: + void emitQCop( int queued ); + +}; + +#endif |