|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
30 #include <boost/asio/io_service.hpp>
31 #include <boost/asio/steady_timer.hpp>
32 #include <curl/curl.h>
33 #include <nlohmann/json.hpp>
46 SMTPModule(zmqpp::context &ctx, zmqpp::socket *pipe,
47 const boost::property_tree::ptree &cfg,
CoreUtilsPtr utils);
bool send_mail(CURL *curl, const MailInfo &mail)
json handle_ws_smtp_setconfig(const WebSockAPI::RequestContext &, const json &)
Process the websocket request "smtp.setconfig".
virtual void on_service_event(const service_event::Event &) override
Function invoked when a service event is triggered.
json handle_ws_smtp_sendmail(const WebSockAPI::RequestContext &, const json &)
Process thesocket request "smtp.sendmail".
json handle_ws_smtp_getconfig(const WebSockAPI::RequestContext &, const json &)
Process the websocket request "smtp.getconfig".
void register_ws_handlers()
Attempt to register websocket handlers against the websocket service, if available.
This is the header file for a generated source file, GitSHA1.cpp.
This is a base class for boost::asio 'aware' module.
std::unique_ptr< SMTPConfig > SMTPConfigUPtr
void async_send_mail(const MailInfo &mail)
Asynchronously and thread-safely send an email.
void process_config()
Process the configuration file.
bool prepare_curl(const MailInfo &mail)
SMTPModule(zmqpp::context &ctx, zmqpp::socket *pipe, const boost::property_tree::ptree &cfg, CoreUtilsPtr utils)
static constexpr const char * wshandler_setconfig
Holds valuable pointer to provide context to a request.
static constexpr const char * wshandler_sendmail
std::shared_ptr< CoreUtils > CoreUtilsPtr
SMTPConfigUPtr smtp_config_
Configuration: either load from XML or database.
static constexpr const char * wshandler_getconfig