diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-02-11 07:04:04 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-02-11 07:04:04 -0200 |
commit | 336495264e7c2cba52fad23905d21ad5c5179f95 (patch) | |
tree | f7aeedda0b269d63637611ae9b414b0914158d04 /etc | |
parent | c70002be33fb2279f35345bd190b574c7dfe41df (diff) | |
parent | 02376f6f23ae06add4bfa545325a1ed0fd2d6bc8 (diff) | |
download | pfsense-336495264e7c2cba52fad23905d21ad5c5179f95.zip pfsense-336495264e7c2cba52fad23905d21ad5c5179f95.tar.gz |
Merge pull request #1480 from phil-davis/patch-1
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/notices.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index 0444535..bad3a32 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -295,15 +295,18 @@ function notify_via_smtp($message, $force = false) { fwrite($fd, $message); fclose($fd); - send_smtp_message($message, "{$config['system']['hostname']}.{$config['system']['domain']} - Notification"); + send_smtp_message($message, "{$config['system']['hostname']}.{$config['system']['domain']} - Notification", $force); return; } -function send_smtp_message($message, $subject = "(no subject)") { +function send_smtp_message($message, $subject = "(no subject)", $force = false) { global $config, $g; require_once("sasl.inc"); require_once("smtp.inc"); + if(isset($config['notifications']['smtp']['disable']) && !$force) + return; + if(!$config['notifications']['smtp']['ipaddress']) return; |