summaryrefslogtreecommitdiffstats
path: root/etc/inc/notices.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-10-03 00:38:32 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-10-03 00:38:32 -0400
commitf9fb2569aa1efafc099d53606d0ebdec2d9535d8 (patch)
tree2aacd3c6dede9ef3d18ef9a1cf1d213f4cbae0df /etc/inc/notices.inc
parent11b774144d4ca0d0436df0484b069eca4c608e62 (diff)
downloadpfsense-f9fb2569aa1efafc099d53606d0ebdec2d9535d8.zip
pfsense-f9fb2569aa1efafc099d53606d0ebdec2d9535d8.tar.gz
Alert if there is a problem sending the test message
Diffstat (limited to 'etc/inc/notices.inc')
-rw-r--r--etc/inc/notices.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index d24909b..cb72961 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -303,10 +303,13 @@ function notify_via_smtp($message) {
fwrite($fd, $message);
fclose($fd);
- if($smtp->SendMessage($from, array($to), $headers, $message))
+ if($smtp->SendMessage($from, array($to), $headers, $message)) {
log_error("Message sent to {$to} OK");
- else
+ return;
+ } else {
log_error("Could not send the message to {$to} -- Error: {$smtp->error}");
+ return("Could not send the message to {$to} -- Error: {$smtp->error}");
+ }
}
OpenPOWER on IntegriCloud