From 127c50cc446de489c702400ebc5fc4874f6311b2 Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 23 Dec 2003 01:58:59 +0000 Subject: UFFFFFFF flushing send queue mostly finished. Attention: To get it work you must apply the patches from the libetpan/ directory! ToDo: - when flush then select a smtp-account to use for when there are more than one smtp accounts. (opiemail.cpp) This moment I just use the first one. - the special funs in mboxwrapper (deleting range of mail, storing a message to a folder) should go to all mailbox wrappers, means into the global interface of them. - cleanup/review the code of the smtp-wrapper. --- (limited to 'noncore/net/mail/smtpwrapper.h') diff --git a/noncore/net/mail/smtpwrapper.h b/noncore/net/mail/smtpwrapper.h index 41e9a8c..c0dcc11 100644 --- a/noncore/net/mail/smtpwrapper.h +++ b/noncore/net/mail/smtpwrapper.h @@ -10,6 +10,8 @@ #include "settings.h" class Mail; +class MBOXwrapper; +class RecMail; class Attachment; struct mailimf_fields; struct mailimf_field; @@ -25,6 +27,7 @@ public: SMTPwrapper( Settings *s ); virtual ~SMTPwrapper(){} void sendMail(const Mail& mail,bool later=false ); + void flushOutbox(SMTPaccount*smtp); protected: mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); @@ -34,22 +37,27 @@ protected: mailimf_address_list *parseAddresses(const QString&addr ); void addFileParts( mailmime *message,const QList&files ); mailmime *buildTxtPart(const QString&str ); - mailmime *buildFilePart(const QString&filename,const QString&mimetype ); - void smtpSend( mailmime *mail,bool later ); - mailimf_field *getField( mailimf_fields *fields, int type ); + mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); + void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); clist *createRcptList( mailimf_fields *fields ); - char *getFrom( mailmime *mail ); SMTPaccount *getAccount(const QString&from ); void writeToFile(const QString&file, mailmime *mail ); void readFromFile(const QString&file, char **data, size_t *size ); - void storeMail(char*mail, size_t length, const QString&box); + static void storeMail(char*mail, size_t length, const QString&box); static QString mailsmtpError( int err ); static QString getTmpFile(); static void progress( size_t current, size_t maximum ); static void addRcpts( clist *list, mailimf_address_list *addr_list ); + static char *getFrom( mailmime *mail ); + static char *getFrom( mailimf_field *ffrom); + static mailimf_field *getField( mailimf_fields *fields, int type ); + static int smtpSend(char*from,clist*rcpts,char*data,size_t size, SMTPaccount *smtp ); + void storeMail(mailmime*mail, const QString&box); Settings *settings; + + int sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which); }; #endif -- cgit v0.9.0.2