diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 1a97f3502b7..9fb14fe1f1d 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -188,8 +188,8 @@ class MailingTargets // This can't be abstract as it is used for some method if ($this->db->errno() != 'DB_ERROR_RECORD_ALREADY_EXISTS') { // Si erreur autre que doublon - dol_syslog($this->db->error()); - $this->error=$this->db->error(); + dol_syslog($this->db->error().' : '.$targetarray['email']); + $this->error=$this->db->error().' : '.$targetarray['email']; $this->db->rollback(); return -1; } diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index 152322c2899..1453f247d28 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -179,7 +179,9 @@ class mailing_xinputfile extends MailingTargets { $i++; $langs->load("errors"); - $this->error = $langs->trans("ErrorFoundBadEmailInFile",$i,$cpt,$email); + $msg = $langs->trans("ErrorFoundBadEmailInFile", $i, $cpt, $email); + if (!empty($msg)) $this->error = $msg; + else $this->error = 'ErrorFoundBadEmailInFile '.$i.' '.$cpt.' '.$email; // We experience case where $langs->trans return an empty string. } } }