summaryrefslogtreecommitdiffstats
path: root/kbugbuster/backend/mailsender.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /kbugbuster/backend/mailsender.h
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/backend/mailsender.h')
-rw-r--r--kbugbuster/backend/mailsender.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/kbugbuster/backend/mailsender.h b/kbugbuster/backend/mailsender.h
new file mode 100644
index 00000000..06517f9c
--- /dev/null
+++ b/kbugbuster/backend/mailsender.h
@@ -0,0 +1,50 @@
+#ifndef MAILSENDER_H
+#define MAILSENDER_H
+
+#include <qstring.h>
+#include <qobject.h>
+
+class KURL;
+class Smtp;
+
+class MailSender : public QObject
+{
+ Q_OBJECT
+ public:
+ enum MailClient { Sendmail = 0, KMail = 1, Direct = 2 };
+
+ MailSender(MailClient,const QString &smtpServer=QString::null);
+ virtual ~MailSender();
+
+ MailSender *clone() const;
+
+ /**
+ Send mail with specified from, to and subject field and body as text. If
+ bcc is set, send a blind carbon copy to the sender from.
+ If recipient is specified the mail is sent to the specified address
+ instead of 'to' . (this currently only works in for direct mail
+ sending through SMTP.
+ */
+ bool send(const QString &fromName, const QString &fromEmail,
+ const QString &to,const QString &subject,
+ const QString &body,bool bcc=false,
+ const QString &recipient = QString::null);
+
+ signals:
+ void status( const QString &message );
+ void finished();
+
+ private slots:
+ void smtpSuccess();
+ void smtpError(const QString &command, const QString &response);
+
+ private:
+ int kMailOpenComposer(const QString& arg0,const QString& arg1,
+ const QString& arg2,const QString& arg3,
+ const QString& arg4,int arg5,const KURL& arg6);
+
+ MailClient m_client;
+ QString m_smtpServer;
+};
+
+#endif