summaryrefslogtreecommitdiff
path: root/include/mail.h
blob: 7148b56d81fe6bdf671f4e9aceb9faa0ba8e02a9 (plain)
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
#ifndef MAIL_H
#define MAIL_H

extern CoreExport bool Mail(User *u, NickRequest *nr, const std::string &service, const std::string &subject, const std::string &message);
extern CoreExport bool Mail(User *u, NickCore *nc, const std::string &service, const std::string &subject, const std::string &message);
extern CoreExport bool Mail(NickCore *nc, const std::string &subject, const std::string &message);
extern CoreExport bool MailValidate(const std::string &email);

class MailThread : public Thread
{
 private:
	std::string MailTo;
	std::string Addr;
	std::string Subject;
	std::string Message;

	bool Success;
 public:
	MailThread(const std::string &mailto, const std::string &addr, const std::string &subject, const std::string &message) : Thread(), MailTo(mailto), Addr(addr), Subject(subject), Message(message), Success(false)
	{
	}

	~MailThread();

	void Run();
};

#endif // MAIL_H