'mail',
'label' => 'Envoyer un e-mail',
'class' => get_called_class(),
'path' => __FILE__,
'icon' => 'fas fa-envelope-open-text',
'color' => '#ff9f43',
);
if(!isset($key)) return $manifest;
return isset($manifest[$key]) ? $manifest[$key] : '' ;
}
//méthode d'affichage de l'effet
public static function form($item){
$html = '';
$class = get_called_class();
ob_start();
?>
toArray();
if(isset($parameters['old'])) $parameters['old'] = $parameters['old']->toArray();
}
$effect->values['title'] = template($effect->values['title'],$parameters,true);
$effect->values['message'] = template($effect->values['message'],$parameters,true);
$expeditor = $conf->get('workflow_mail_from') != '' ? $conf->get('workflow_mail_from'): PROGRAM_NAME.' ';
$reply = $conf->get('workflow_mail_reply') != '' ? $conf->get('workflow_mail_reply'): $expeditor;
$mail = new Mail();
$mail->expeditor = $expeditor;
$mail->reply = $reply;
$mail->title = $effect->values['title'];
$mail->message = html_entity_decode($effect->values['message']);
$mail->recipients['to'][] = $effect->values['to'];
$logs = 'Sujet: "'.$mail->title.'" pour '.implode($mail->recipients['to']);
$mail->send();
}catch(Exception $e){
$logs .= '
Erreur : '.$e->getMessage().'';
}
return $logs;
}
}
?>