diff --git a/server/conf/mail/web_traffic_notification_warn_en.txt b/server/conf/mail/web_traffic_notification_warn_en.txt new file mode 100644 index 0000000000000000000000000000000000000000..f69d906dabecd58dbe3f1b48adb8ac465c49fe96 --- /dev/null +++ b/server/conf/mail/web_traffic_notification_warn_en.txt @@ -0,0 +1,8 @@ +MIME-Version: 1.0 +Content-type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit +From: {admin_mail} +Reply-To: {admin_mail} +Subject: Website traffic notification + +The website {domain} is over traffic. diff --git a/server/conf/mail/web_traffic_notification_warn_nl.txt b/server/conf/mail/web_traffic_notification_warn_nl.txt new file mode 100644 index 0000000000000000000000000000000000000000..02d9a03c2fb4818aabf7278a1f789fefd2703eff --- /dev/null +++ b/server/conf/mail/web_traffic_notification_warn_nl.txt @@ -0,0 +1,8 @@ +MIME-Version: 1.0 +Content-type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit +From: {admin_mail} +Reply-To: {admin_mail} +Subject: Webverkeerslimiet bereikt + +De website {domain} heeft het verkeerslimiet voor deze maand bereikt. diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index ad18f17c9bdf4e5f5d2f86c2fa226dbb8b607418..bd6a410309cb35b77bf41468805b547a82723410 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -86,6 +86,9 @@ class cronjob_quota_notify extends cronjob { $app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'y', "active" => 'n'), 'domain_id', $rec['domain_id']); $app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.', LOGLEVEL_DEBUG); } + else { + $app->log('Traffic quota for '.$rec['domain'].' exceeded.', LOGLEVEL_DEBUG); + } //* Send traffic notifications if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) { @@ -111,7 +114,12 @@ class cronjob_quota_notify extends cronjob { } } - $this->_tools->send_notification_email('web_traffic_notification', $placeholders, $recipients); + if ($web_config['overtraffic_disable_web'] == 'y') { + $this->_tools->send_notification_email('web_traffic_notification', $placeholders, $recipients); + } + else { + $this->_tools->send_notification_email('web_traffic_notification_warn', $placeholders, $recipients); + } } } else {