FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522)

* FIX: pre-send mail mass action: keep __EMAIL__ substitution

* FIX: comment

* test github workflows

* test github workflow for 18

* test v18 pr workflow

* FIX: massaction email tpl: keep preset

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Marc de Lima Lucio 2025-06-28 17:58:07 +02:00 committed by GitHub
parent 52a5d4ca0a
commit 4841a8d2ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -280,7 +280,7 @@ if ($massaction == 'presend') {
// Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object);
$substitutionarray['__EMAIL__'] = $sendto;
$substitutionarray['__EMAIL__'] = empty($sendto) ? '__EMAIL__' : $sendto;
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__PERSONALIZED__'] = ''; // deprecated
$substitutionarray['__CONTACTCIVNAME__'] = '';