summaryrefslogtreecommitdiff
path: root/src/mail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail.cpp')
-rw-r--r--src/mail.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mail.cpp b/src/mail.cpp
index 5cb64f6d3..66cf1b81e 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -13,7 +13,10 @@ void MailThread::Run()
FILE *pipe = popen(Config->SendMailPath.c_str(), "w");
if (!pipe)
+ {
+ SetExitState();
return;
+ }
fprintf(pipe, "From: %s\n", Config->SendFrom.c_str());
if (Config->DontQuoteAddresses)
@@ -27,6 +30,7 @@ void MailThread::Run()
pclose(pipe);
Success = true;
+ SetExitState();
}
bool Mail(User *u, NickRequest *nr, BotInfo *service, const Anope::string &subject, const Anope::string &message)