Skip to content
Snippets Groups Projects
Commit df3f29ee authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix hidden feature to send remind by email

parent f57284f5
Branches
Tags
No related merge requests found
...@@ -165,10 +165,12 @@ if ($action == 'presend' && GETPOST('sendmail')) ...@@ -165,10 +165,12 @@ if ($action == 'presend' && GETPOST('sendmail'))
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>', '__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
//'__LASTNAME__' => $obj2->lastname, //'__LASTNAME__' => $obj2->lastname,
//'__FIRSTNAME__' => $obj2->firstname, //'__FIRSTNAME__' => $obj2->firstname,
'__FACREF__' => $object->ref, // For backward compatibility
'__REF__' => $object->ref, '__REF__' => $object->ref,
'__REFCLIENT__' => $object->thirdparty->name '__REFCLIENT__' => $object->thirdparty->name
); );
$subject=make_substitutions($subject, $substitutionarray);
$message=make_substitutions($message, $substitutionarray); $message=make_substitutions($message, $substitutionarray);
$actiontypecode='AC_FAC'; $actiontypecode='AC_FAC';
...@@ -196,7 +198,7 @@ if ($action == 'presend' && GETPOST('sendmail')) ...@@ -196,7 +198,7 @@ if ($action == 'presend' && GETPOST('sendmail'))
} }
else else
{ {
//$result=$mailfile->sendfile(); $result=$mailfile->sendfile();
if ($result) if ($result)
{ {
$resultmasssend.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain " $resultmasssend.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain "
...@@ -250,7 +252,7 @@ if ($action == 'presend' && GETPOST('sendmail')) ...@@ -250,7 +252,7 @@ if ($action == 'presend' && GETPOST('sendmail'))
$nbignored++; $nbignored++;
$langs->load("other"); $langs->load("other");
$resultmasssend.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>'; $resultmasssend.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>';
dol_syslog('Failed to read file: '.$file); dol_syslog('Failed to read file: '.$file, LOG_WARNING);
break ; break ;
} }
} }
...@@ -263,7 +265,7 @@ if ($action == 'presend' && GETPOST('sendmail')) ...@@ -263,7 +265,7 @@ if ($action == 'presend' && GETPOST('sendmail'))
} }
else else
{ {
setEventMessage($langs->trans("NoRemindSent"), 'warnings'); setEventMessage($langs->trans("NoRemindSent"), 'warnings'); // May be object has no generated PDF file
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment