summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/smtpwrapper.h
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h
new file mode 100644
index 0000000..8fdb07d
--- a/dev/null
+++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h
@@ -0,0 +1,53 @@
1#ifndef SMTPwrapper_H
2#define SMTPwrapper_H
3
4#include <qpe/applnk.h>
5
6#include <qbitarray.h>
7#include <qdatetime.h>
8#include <libetpan/clist.h>
9
10#include "settings.h"
11
12class Mail;
13class Attachment;
14struct mailimf_fields;
15struct mailimf_field;
16struct mailimf_mailbox;
17struct mailmime;
18struct mailimf_address_list;
19
20class SMTPwrapper : public QObject
21{
22 Q_OBJECT
23
24public:
25 SMTPwrapper( Settings *s );
26 virtual ~SMTPwrapper(){}
27 void sendMail(const Mail& mail );
28
29protected:
30 mailimf_mailbox *newMailbox(const QString&name,const QString&mail );
31 mailimf_fields *createImfFields(const Mail &mail );
32 mailmime *createMimeMail(const Mail&mail );
33
34 mailimf_address_list *parseAddresses(const QString&addr );
35 void addFileParts( mailmime *message,const QList<Attachment>&files );
36 mailmime *buildTxtPart(const QString&str );
37 mailmime *buildFilePart(const QString&filename,const QString&mimetype );
38 void smtpSend( mailmime *mail );
39 mailimf_field *getField( mailimf_fields *fields, int type );
40 clist *createRcptList( mailimf_fields *fields );
41 char *getFrom( mailmime *mail );
42 SMTPaccount *getAccount(const QString&from );
43 void writeToFile(const QString&file, mailmime *mail );
44 void readFromFile(const QString&file, char **data, size_t *size );
45
46 static QString mailsmtpError( int err );
47 static QString getTmpFile();
48 static void progress( size_t current, size_t maximum );
49 static void addRcpts( clist *list, mailimf_address_list *addr_list );
50 Settings *settings;
51};
52
53#endif