Introdotta possibilità di invio mail multiplo
This commit is contained in:
parent
06d2fb9342
commit
ee1618c095
15
mail.php
15
mail.php
|
@ -28,7 +28,7 @@ $smtp = $template->account;
|
||||||
$body = $module->replacePlaceholders($id_record, $template['body']);
|
$body = $module->replacePlaceholders($id_record, $template['body']);
|
||||||
$subject = $module->replacePlaceholders($id_record, $template['subject']);
|
$subject = $module->replacePlaceholders($id_record, $template['subject']);
|
||||||
|
|
||||||
$email = $module->replacePlaceholders($id_record, '{email}');
|
$emails = explode( ';', $module->replacePlaceholders($id_record, '{email}') );
|
||||||
$id_anagrafica = $module->replacePlaceholders($id_record, '{id_anagrafica}');
|
$id_anagrafica = $module->replacePlaceholders($id_record, '{id_anagrafica}');
|
||||||
|
|
||||||
// Campi mancanti
|
// Campi mancanti
|
||||||
|
@ -80,10 +80,17 @@ if (!empty($template['bcc'])) {
|
||||||
echo '
|
echo '
|
||||||
|
|
||||||
<b>'.tr('Destinatari').' <span class="tip" title="'.tr('Email delle sedi, dei referenti o agente collegato all\'anagrafica.').'"><i class="fa fa-question-circle-o"></i></span></b>
|
<b>'.tr('Destinatari').' <span class="tip" title="'.tr('Email delle sedi, dei referenti o agente collegato all\'anagrafica.').'"><i class="fa fa-question-circle-o"></i></span></b>
|
||||||
<div class="row" id="lista-destinatari">
|
<div class="row" id="lista-destinatari">';
|
||||||
|
|
||||||
|
$idx = 0;
|
||||||
|
|
||||||
|
foreach( $emails as $email ){
|
||||||
|
echo '
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{[ "type": "email", "name": "destinatari[0]", "value": "'.$email.'", "icon-before": "choice|email", "extra": "onkeyup=\'aggiungiDestinatario();\'", "class": "destinatari", "required": 1 ]}
|
{[ "type": "email", "name": "destinatari['.$idx++.']", "value": "'.$email.'", "icon-before": "choice|email", "extra": "onkeyup=\'aggiungiDestinatario();\'", "class": "destinatari", "required": 1 ]}
|
||||||
</div>
|
</div>';
|
||||||
|
}
|
||||||
|
echo '
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
Loading…
Reference in New Issue