Anope IRC Services  Version 2.0
mail.h
Go to the documentation of this file.
1 /*
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  *
12  */
13 
14 #ifndef MAIL_H
15 #define MAIL_H
16 
17 #include "anope.h"
18 #include "threadengine.h"
19 #include "serialize.h"
20 
21 namespace Mail
22 {
23  extern CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message);
24  extern CoreExport bool Send(NickCore *to, const Anope::string &subject, const Anope::string &message);
25  extern CoreExport bool Validate(const Anope::string &email);
26 
27  /* A email message being sent */
28  class Message : public Thread
29  {
30  private:
38 
39  bool success;
40  public:
48  Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
49 
50  ~Message();
51 
52  /* Called from within the thread to actually send the mail */
53  void Run() anope_override;
54  };
55 
56 } // namespace Mail
57 
58 #endif // MAIL_H
Definition: bots.h:24
Anope::string subject
Definition: mail.h:35
Anope::string message
Definition: mail.h:36
Definition: users.h:34
Definition: mail.h:21
bool dont_quote_addresses
Definition: mail.h:37
Anope::string mail_to
Definition: mail.h:33
Anope::string addr
Definition: mail.h:34
Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message)
Definition: mail.cpp:17
CoreExport bool Validate(const Anope::string &email)
Definition: mail.cpp:115
CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message)
Definition: mail.cpp:54
#define anope_override
Definition: services.h:56
bool success
Definition: mail.h:39
#define CoreExport
Definition: services.h:62
Anope::string sendmail_path
Definition: mail.h:31
Anope::string send_from
Definition: mail.h:32
void Run() anope_override
Definition: mail.cpp:29