27use PHPMailer\PHPMailer\PHPMailer;
28use PHPMailer\PHPMailer\SMTP;
36}
catch (Exception $exc) {
44if (
$op2 ==
'parameter_test_smtp')
47 $mail_test=
$http->get(
"email_test");
48 $mail_parameter=
new Mail_Parameter(
51 $mail_parameter->from_get();
52 $mail=
new SMTPMail($mail_parameter);
54 $e->SMTPDebug=SMTP::DEBUG_CONNECTION;
55 $mail->mailto($mail_test);
56 $mail->set_subject(
_(
"Test envoi email").date(
"d-m-Y H:i"));
57 $mail->set_message(
_(
"Test de votre configuration"));
61 }
catch (Exception $exc) {
62 echo $exc->getTraceAsString();
69if (
$op2 ==
"save_config_smtp")
72 $mail_parameter=
new Mail_Parameter(
76 $mail_parameter->from_post();
77 $mail_parameter->save();
79 }
catch (Exception $exc) {
87throw new \Exception(
"NOK INVALID ACTION" );
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
_("actif, passif,charge,...")
configuration email and test PHPMAILER.
const MAIL_SETTING_NOALYSS
if(count($exist_request)> 1) $mail