Hi all, I am getting the following error in my ssh terminal when my script prompts an email to be sent:
exim abandoned: unknown, malformed, or incomplete option -s
My script is as follows:
any suggestions?
exim abandoned: unknown, malformed, or incomplete option -s
My script is as follows:
Code:
void send_alert(const std::string &subject, const std::string &text) {
start_sql("SELECT * FROM tconfig;");
run_sql();
std::string sender_addr = decode_str(sql_result("sender_addr"));
std::string alert_addr = decode_str(sql_result("alert_addr"));
end_sql();
std::string filename = tmpnam(NULL);
std::ofstream file(filename.c_str());
file << text;
file.close();
std::string cmd = "mail " + alert_addr + " -s '" + subject + "' < " + filename;
system(cmd.c_str());
}
any suggestions?