TreeFrogFramework  1.18
tsendmailmailer.h
Go to the documentation of this file.
1 #ifndef TSENDMAILMAILER_H
2 #define TSENDMAILMAILER_H
3 
4 #include <QObject>
5 #include <QStringList>
6 #include <QByteArray>
7 #include <QProcess>
8 #include <TMailMessage>
9 
10 
11 class T_CORE_EXPORT TSendmailMailer : public QObject
12 {
13  Q_OBJECT
14 public:
15  TSendmailMailer(const QString &command, QObject *parent = 0);
16  ~TSendmailMailer();
17 
18  QString key() const { return "sendmail"; }
19  bool send(const TMailMessage &message);
20  void sendLater(const TMailMessage &message);
21 
22 protected slots:
23  void sendAndDeleteLater();
24 
25 protected:
26  bool send();
27 
28 private:
29  QString sendmailCmd;
30  TMailMessage mailMessage;
31 
34 };
35 
36 #endif // TSENDMAILMAILER_H
#define T_CORE_EXPORT
Definition: tglobal.h:81
#define T_DISABLE_COPY(Class)
Definition: tglobal.h:137
#define T_DISABLE_MOVE(Class)
Definition: tglobal.h:141
The TSendmailMailer class provides a simple functionality to send emails by sendmail command...
Definition: tsendmailmailer.h:11
QString key() const
Definition: tsendmailmailer.h:18