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 069346099b15a37296ffe82e41f60d56d17df8df..10235b912900d2098606cc6ed2cde3095c503362 100644
--- a/server/lib/classes/cron.d/300-quota_notify.inc.php
+++ b/server/lib/classes/cron.d/300-quota_notify.inc.php
@@ -442,15 +442,17 @@ class cronjob_quota_notify extends cronjob {
 								else $used_ratio = 0;
 
 								//* send notifications only if 90% or more of the quota are used
-								if($used_ratio > 0.9) {
+								if($used_ratio > 0.9 && $user_ratio != 0) {
 
-									//* reset notification date
-									if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => null), 'database_id', $rec['database_id']);
+									//* could a notification be sent?
+									$send_notification = false;
+									if(!$rec['last_quota_notification']) $send_notification = true; //* not yet notified
+									elseif($web_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $web_config['overquota_notify_freq']) $send_notification = true;
 
-									$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']);
 
-									// send notification - everything ok again
-									if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y')) {
+									//* Send quota notifications
+									if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) {
+										$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']);
 										$placeholders = array(
 											'{database_name}' => $rec['database_name'],
 											'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
@@ -462,27 +464,25 @@ class cronjob_quota_notify extends cronjob {
 										$recipients = array();
 
 										//* send email to admin
-										if($global_config['admin_mail'] != '' && $web_config['overquota_db_notify_admin'] == 'y') 
+										if($global_config['admin_mail'] != '' && $web_config['overquota_db_notify_admin'] == 'y')
 											$recipients[] = $global_config['admin_mail'];
 
 										//* Send email to client
-										if($web_config['overquota_db_notify_client'] == 'y' && $client['email'] != '') 
+										if($web_config['overquota_db_notify_client'] == 'y' && $client['email'] != '')
 											$recipients[] = $client['email'];
 
-										$this->_tools->send_notification_email('db_quota_ok_notification', $placeholders, $recipients);
+										$this->_tools->send_notification_email('db_quota_notification', $placeholders, $recipients);
 
 									}
 
 								} else {
+									//* reset notification date
+									if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => null), 'database_id', $rec['database_id']);
 
-									//* could a notification be sent?
-									$send_notification = false;
-									if(!$rec['last_quota_notification']) $send_notification = true; //* not yet notified
-									elseif($web_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $web_config['overquota_notify_freq']) $send_notification = true;
+									$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']);
 
-									//* Send quota notifications
-									if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) {
-										$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']);
+									// send notification - everything ok again
+									if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y')) {
 										$placeholders = array(
 											'{database_name}' => $rec['database_name'],
 											'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
@@ -494,16 +494,17 @@ class cronjob_quota_notify extends cronjob {
 										$recipients = array();
 
 										//* send email to admin
-										if($global_config['admin_mail'] != '' && $web_config['overquota_db_notify_admin'] == 'y')
+										if($global_config['admin_mail'] != '' && $web_config['overquota_db_notify_admin'] == 'y') 
 											$recipients[] = $global_config['admin_mail'];
 
 										//* Send email to client
-										if($web_config['overquota_db_notify_client'] == 'y' && $client['email'] != '')
+										if($web_config['overquota_db_notify_client'] == 'y' && $client['email'] != '') 
 											$recipients[] = $client['email'];
 
-										$this->_tools->send_notification_email('db_quota_notification', $placeholders, $recipients);
+										$this->_tools->send_notification_email('db_quota_ok_notification', $placeholders, $recipients);
 
 									}
+
 								}
 
 							}