26 throw error(
"Could not send email. No user with the name '" + to_user +
"' exists.");
31 throw error(
"Could not send email. The email address of the user '" + to_user +
"' is empty.");
41 srand(static_cast<unsigned>(time(
nullptr)));
virtual std::string get_mail(const std::string &user)=0
Used in send_mail().
static l_noret error(LoadState *S, const char *why)
bool send_mail(const std::string &to_user, const std::string &subject, const std::string &message)
Sends an email to the specified address.
Definitions for the interface to Wesnoth Markup Language (WML).
GLuint GLsizei GLsizei * length
void init_mailer(const config &c)
Initiate the mailer object.
virtual bool user_exists(const std::string &name)=0
Returns true if a user with the given name exists.
std::string create_salt(int length=8)
Create a random string of digits for password encryption.
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string