summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_notifications.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-11 14:59:27 -0300
committerRenato Botelho <renato@netgate.com>2016-08-11 14:59:27 -0300
commit50950d0686160e85af6eea11b2b43ca6a69daa7d (patch)
tree83978cc892b02fac2d63641c14ab45ea46e39142 /src/usr/local/www/system_advanced_notifications.php
parentf2b0bf18e88670e3dd8d8b0c03a034e4d2f45b56 (diff)
downloadpfsense-50950d0686160e85af6eea11b2b43ca6a69daa7d.zip
pfsense-50950d0686160e85af6eea11b2b43ca6a69daa7d.tar.gz
Be more verbose and let user know results of SMTP settings test
Diffstat (limited to 'src/usr/local/www/system_advanced_notifications.php')
-rw-r--r--src/usr/local/www/system_advanced_notifications.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php
index 4b3a1a5..9fa52ba 100644
--- a/src/usr/local/www/system_advanced_notifications.php
+++ b/src/usr/local/www/system_advanced_notifications.php
@@ -169,7 +169,13 @@ if ($_POST) {
if (file_exists("/var/db/notices_lastmsg.txt")) {
unlink("/var/db/notices_lastmsg.txt");
}
- $savemsg = notify_via_smtp(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true);
+ $smtp_test_result = notify_via_smtp(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true);
+ if (empty($smtp_test_result)) {
+ $smtp_test_result = gettext("SMTP testing e-mail successfully sent");
+ $smtp_test_class = 'success';
+ } else {
+ $smtp_test_class = 'danger';
+ }
}
}
@@ -180,8 +186,8 @@ if ($input_errors) {
print_input_errors($input_errors);
}
-if ($savemsg) {
- print_info_box($savemsg, 'success');
+if ($smtp_test_result) {
+ print_info_box($smtp_test_result, $smtp_test_class);
}
$tab_array = array();
OpenPOWER on IntegriCloud