diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 0070f96fc68..df388d7b5fa 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2497,7 +2497,7 @@ class ActionComm extends CommonObject //Select all action comm reminders $sql = "SELECT rowid as id FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; $sql .= " WHERE typeremind = 'email'"; - $sql .= " AND status <= 0"; // 0=No yet sent, -1=Error + $sql .= " AND status = 0"; // 0=No yet sent, -1=Error. TODO Include reminder in error once we can count number of error, so we can try 5 times and not more on errors. $sql .= " AND dateremind <= '".$this->db->idate($now)."'"; $sql .= " AND entity IN (".getEntity('actioncomm').")"; $sql .= $this->db->order("dateremind", "ASC"); @@ -2568,7 +2568,7 @@ class ActionComm extends CommonObject if ($cMailFile->sendfile()) { $nbMailSend++; } else { - $errormesg = $cMailFile->error.' : '.$to; + $errormesg = 'Failed to send email to: '.$to.' '.$cMailFile->error.join(',', $cMailFile->errors); $error++; } }