feature: Copy all email alerts to default contact (#8178)

* feature: Copy all email alerts to default contact

* change in SQL and add check as requested

* Rename 233.sql to 234.sql

* tab removing
This commit is contained in:
FTBZ
2018-02-05 09:25:24 +01:00
committed by Neil Lathwood
parent dc2883f59d
commit eb72a5394e
3 changed files with 10 additions and 0 deletions

View File

@@ -317,6 +317,11 @@ function GetContacts($results)
}
}
# Copy all email alerts to default contact if configured.
if (!isset($tmp_contacts[$config['alert']['default_mail']]) && ($config['alert']['default_copy'])) {
$tmp_contacts[$config['alert']['default_mail']] = '';
}
# Send email to default contact if no other contact found
if ((count($tmp_contacts) == 0) && ($config['alert']['default_if_none']) && (!empty($config['alert']['default_mail']))) {
$tmp_contacts[$config['alert']['default_mail']] = '';