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