diff options
-rw-r--r-- | etc/inc/notices.inc | 7 | ||||
-rw-r--r-- | usr/local/www/system_advanced_notifications.php | 3 |
2 files changed, 7 insertions, 3 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}"); + } } diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php index 50e3aef..c327001 100644 --- a/usr/local/www/system_advanced_notifications.php +++ b/usr/local/www/system_advanced_notifications.php @@ -87,7 +87,7 @@ if ($_POST) { notify_via_growl("This is a test message form pfSense. It is safe to ignore this message."); // Send test message via smtp - notify_via_smtp("This is a test message form pfSense. It is safe to ignore this message."); + $savemsg = notify_via_smtp("This is a test message form pfSense. It is safe to ignore this message."); pfSenseHeader("system_advanced_notifications.php"); exit; @@ -103,6 +103,7 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> +<?php if ($savemsg) print_info_box($savemsg); ?> <form action="system_advanced_notifications.php" method="post"> <?php if ($input_errors) |