Amélioreation form + param smtp false

This commit is contained in:
Fred Tempez 2020-05-11 12:15:51 +02:00
parent 5542ba5193
commit 73cd16b953
3 changed files with 59 additions and 56 deletions

View File

@ -853,12 +853,13 @@ class common {
include 'core/layout/mail.php'; include 'core/layout/mail.php';
$layout = ob_get_clean(); $layout = ob_get_clean();
$mail = new PHPMailer\PHPMailer\PHPMailer; $mail = new PHPMailer\PHPMailer\PHPMailer;
// $mail->SMTPDebug = PHPMailer\PHPMailer\SMTP::DEBUG_SERVER;
// Mail // Mail
try{ try{
// Paramètres SMTP // Paramètres SMTP
if ($this->getdata(['config','smtp','enable'])) { if ($this->getdata(['config','smtp','enable'])) {
// $mail->SMTPDebug = PHPMailer\PHPMailer\SMTP::DEBUG_SERVER;
$mail->isSMTP(); $mail->isSMTP();
$mail->SMTPAutoTLS = false;
$mail->Host = $this->getdata(['config','smtp','host']); $mail->Host = $this->getdata(['config','smtp','host']);
$mail->Port = (int) $this->getdata(['config','smtp','port']); $mail->Port = (int) $this->getdata(['config','smtp','port']);
if ($this->getData(['config','smtp','auth'])) { if ($this->getData(['config','smtp','auth'])) {

View File

@ -14,12 +14,12 @@
* Modification de l'affichage de l'icône de langues * Modification de l'affichage de l'icône de langues
*/ */
$("input[name=configSmtpEnable]").on("change", function() {
var configdisablei18nDOM = $("#configdisablei18n"); if ($("input[name=configSmtpEnable]").is(':checked')) {
configdisablei18nDOM.on("change", function() { $(".configSmtpParam").addClass("disabled");
if ($("input[name=configdisablei18n]").is(':checked')) { $(".configSmtpParam").slideDown();
$(".zwiico-flag").css('display','none');
} else { } else {
$(".zwiico-flag").css('display','block'); $(".configSmtpParam").removeClass("disabled");
$(".configSmtpParam").slideUp();
} }
}); });

View File

@ -335,6 +335,7 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="configSmtpParam">
<div class="row"> <div class="row">
<div class="col5"> <div class="col5">
<?php echo template::text('configSmtpHost', [ <?php echo template::text('configSmtpHost', [
@ -387,6 +388,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">