-
Notifications
You must be signed in to change notification settings - Fork 18
/
smtp.h
57 lines (51 loc) · 1.19 KB
/
smtp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef SMTP_H
#define SMTP_H
#include <QtCore>
#include <QCoreApplication>
#include <QTcpSocket>
#include <QString>
#include <QTextStream>
#include <QDebug>
#include <QAbstractSocket>
#include <QDateTime>
#include <QDate>
#include <QLocale>
#include <QObject>
class Smtp : public QObject
{
Q_OBJECT
public:
Smtp(QString smtphost, QString smtpusername, QString smtppass);
~Smtp();
bool Send( const QString &to,const QString &subject, const QString &body );
int linesend;
QStringList ErrorMSG;
bool ReadLiner();
void ErrorCloseAll();
signals:
void status( const QString &);
void SendLine();
public slots:
bool PutSendLine();
private:
bool isconnect;
QString smtphost;
QString smtpusername;
QString smtppass;
QString message;
QString output;
QString RemoteServerName;
QString mailstatus;
QTextStream *t;
QTcpSocket *smtpsocket;
QString from;
QString rcpt;
QString response;
QString SendLineAndGrab(QString senddata);
int Timeout;
QString encodeBase64( QString xml );
QString decodeBase64( QString xml );
int dateswap(QString form, uint unixtime );
QString TimeStampMail();
};
#endif // SMTP_H