diff --git a/core/src/plugins/core.mailer/class.AjxpMailer.php b/core/src/plugins/core.mailer/class.AjxpMailer.php
index beb45adcd6..db740c1498 100644
--- a/core/src/plugins/core.mailer/class.AjxpMailer.php
+++ b/core/src/plugins/core.mailer/class.AjxpMailer.php
@@ -105,7 +105,18 @@ public function mailConsumeQueue ($action, $httpVars, $fileVars) {
$key = key($arrayAjxpKey);
$body = $body . '
' . $arrayAjxpKey[$key][0]->getDescriptionLocation() . ',
';
foreach ($arrayAjxpKey as $ajxpKey => $arrayNotif) {
- $body = $body . '- ' . $arrayNotif[0]->getDescriptionLong(true) . ' (' . count($arrayNotif) . ')
';
+ $descs = array();
+ foreach($arrayNotif as $notif){
+ $desc = $notif->getDescriptionLong(true);
+ if(array_key_exists($desc, $descs)){
+ $descs[$desc] ++;
+ }else{
+ $descs[$desc] = 1;
+ }
+ }
+ foreach($descs as $sentence => $occurences){
+ $body = $body . '- ' . $sentence . ($occurences > 1 ? ' ('.count($arrayNotif).')' :'').'
';
+ }
}
$body = $body . '
';
}