summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-25 14:38:14 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-25 14:38:14 -0400
commit4bbb315509ebc0dd721fe7761e09f4b476028c91 (patch)
tree17122150283154a43b3cb653dbdf963f5c697286 /etc
parentb19369b76bb403662b0b61093f5352dfd01082ca (diff)
downloadpfsense-4bbb315509ebc0dd721fe7761e09f4b476028c91.zip
pfsense-4bbb315509ebc0dd721fe7761e09f4b476028c91.tar.gz
Ensure both fields are present before sending email
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/notices.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index c354b05..5464741 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -200,12 +200,16 @@ function are_notices_pending($category = "all") {
* returns true if message was sent
******/
function notify_via_growl($message) {
- require_once("smtp.inc");
global $config;
if(!$config['notifications']['smtp']['ipaddress'])
return;
+ if(!$config['notifications']['smtp']['notifyemailaddress'])
+ return;
+
+ require_once("smtp.inc");
+
$smtp = new smtp_class;
$from = "pfsense@{$config['system']['hostname']}.{$config['system']['domain']}";
OpenPOWER on IntegriCloud