diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-09 19:02:50 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 21:01:09 -0400 |
commit | 4e1286ca109d079f32d32f07c344a1ab93899032 (patch) | |
tree | ef55488a4cc068f8954a8862ab2e67f2d1872281 /include/mail.h | |
parent | 4149afd45d2c0b9f464d1b4434f7bdaa61873d44 (diff) |
Rewrote the mail system to use threading
Diffstat (limited to 'include/mail.h')
-rw-r--r-- | include/mail.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/mail.h b/include/mail.h new file mode 100644 index 000000000..d64e36f30 --- /dev/null +++ b/include/mail.h @@ -0,0 +1,24 @@ + +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: + const std::string MailTo; + const std::string Addr; + const std::string Subject; + const 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(); +}; |