1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-14 16:36:51 +01:00

Fix invio mail

This commit is contained in:
pek5892 2024-05-21 18:03:38 +02:00
parent fe8635b33f
commit 0feedd99aa

View File

@ -30,8 +30,8 @@ $placeholder_options = [
'is_pec' => intval($smtp['pec']), 'is_pec' => intval($smtp['pec']),
]; ];
$body = $module->replacePlaceholders($id_record, $template['body'], $placeholder_options); $body = $module->replacePlaceholders($id_record, $template->getTranslation('body'), $placeholder_options);
$subject = $module->replacePlaceholders($id_record, $template['subject'], $placeholder_options); $subject = $module->replacePlaceholders($id_record, $template->getTranslation('subject'), $placeholder_options);
$emails = []; $emails = [];
if ($module->replacePlaceholders($id_record, '{email}')) { if ($module->replacePlaceholders($id_record, '{email}')) {
@ -164,12 +164,11 @@ if ($smtp['pec'] == 1 && $module->getTranslation('title') == 'Fatture di vendita
echo ' echo '
<div class="col-md-6"> <div class="col-md-6">
{[ "type": "select", "multiple": "1", "label": "'.tr('Allegati').'", "name": "uploads[]", "value": "'.implode(',', $uploads).'", "help": "'.tr('Allegati del documento o caricati nell\'anagrafica dell\'azienda.').'", "values": "query=SELECT `id`, `title` AS text FROM `zz_files` WHERE `id_module` = '.prepare($id_module).' AND `id_record` = '.prepare($id_record).' UNION SELECT `id`, CONCAT(`title`, \' (Azienda)\') AS text FROM `zz_files` WHERE `id_module` = '.(new Module())->getByField('title', 'Anagrafiche', Models\Locale::getPredefined()->id).' AND `id_record` = (SELECT `valore` FROM `zz_settings` WHERE `title` = \'Azienda predefinita\')", "link": "allegato" ]} {[ "type": "select", "multiple": "1", "label": "'.tr('Allegati').'", "name": "uploads[]", "value": "'.implode(',', $uploads).'", "help": "'.tr('Allegati del documento o caricati nell\'anagrafica dell\'azienda.').'", "values": "query=SELECT `id`, `name` AS text FROM `zz_files` WHERE `id_module` = '.prepare($id_module).' AND `id_record` = '.prepare($id_record).' UNION SELECT `id`, CONCAT(`name`, \' (Azienda)\') AS text FROM `zz_files` WHERE `id_module` = '.(new Module())->getByField('title', 'Anagrafiche', Models\Locale::getPredefined()->id).' AND `id_record` = '.setting('Azienda predefinita').'", "link": "allegato" ]}
</div> </div>
</div>'; </div>';
echo ' echo '
<div class="row"> <div class="row">
<div class="col-md-12">'; <div class="col-md-12">';
echo input([ echo input([