diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 5e893fe7d1e..8094a3206d8 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -129,10 +129,12 @@ if ($action == 'presend' && GETPOST('sendmail')) '__CHECK_READ__' => '', //'__LASTNAME__' => $obj2->lastname, //'__FIRSTNAME__' => $obj2->firstname, - '__REF__' => $object->ref, + '__FACREF__' => $object->ref, // For backward compatibility + '__REF__' => $object->ref, '__REFCLIENT__' => $object->thirdparty->name ); + $subject=make_substitutions($subject, $substitutionarray); $message=make_substitutions($message, $substitutionarray); $actiontypecode='AC_FAC'; @@ -160,7 +162,7 @@ if ($action == 'presend' && GETPOST('sendmail')) } else { - //$result=$mailfile->sendfile(); + $result=$mailfile->sendfile(); if ($result) { $resultmasssend.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain "