NEW: Replace event title by the email subject if option activated

This commit is contained in:
kkhelifa 2022-12-05 11:11:18 +01:00
parent 7deccc97b1
commit cf02d33ab0
2 changed files with 6 additions and 0 deletions

View File

@ -592,6 +592,9 @@ if (!$error && $massaction == 'confirm_presend') {
$objectobj2->actionmsg2 = $actionmsg2; // Short text
$objectobj2->fk_element = $objid2;
$objectobj2->elementtype = $objectobj2->element;
if (!empty($conf->global->MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT)) {
$objectobj2->actionmsg2 = $subjectreplaced; // Short text
}
$triggername = strtoupper(get_class($objectobj2)).'_SENTBYMAIL';
if ($triggername == 'SOCIETE_SENTBYMAIL') {

View File

@ -382,6 +382,9 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
$object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
$object->actionmsg = $message; // Long text
$object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...);
if (!empty($conf->global->MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT)) {
$object->actionmsg2 = $subject; // Short text
}
$object->trackid = $trackid;
$object->fk_element = $object->id;