[-] BO : modified the treatment in order to add specials characters like password in Preferences/Emails
This commit is contained in:
@@ -30,18 +30,17 @@ include_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||
/* Getting cookie or logout */
|
||||
require_once(dirname(__FILE__).'/init.php');
|
||||
|
||||
$smtpChecked = (trim($_GET['mailMethod']) == 'smtp');
|
||||
$smtpServer = $_GET['smtpSrv'];
|
||||
$content = $_GET['testMsg'];
|
||||
$subject = $_GET['testSubject'];
|
||||
$smtpChecked = (trim($_POST['mailMethod']) == 'smtp');
|
||||
$smtpServer = $_POST['smtpSrv'];
|
||||
$content = $_POST['testMsg'];
|
||||
$subject = $_POST['testSubject'];
|
||||
$type = 'text/html';
|
||||
$to = $_GET['testEmail'];
|
||||
$to = $_POST['testEmail'];
|
||||
$from = Configuration::get('PS_SHOP_EMAIL');
|
||||
$smtpLogin = $_GET['smtpLogin'];
|
||||
$smtpPassword = $_GET['smtpPassword'];
|
||||
$smtpPort = $_GET['smtpPort'];
|
||||
$smtpEncryption = $_GET['smtpEnc'];
|
||||
|
||||
$smtpLogin = $_POST['smtpLogin'];
|
||||
$smtpPassword = $_POST['smtpPassword'];
|
||||
$smtpPort = $_POST['smtpPort'];
|
||||
$smtpEncryption = $_POST['smtpEnc'];
|
||||
$result = Mail::sendMailTest(Tools::htmlentitiesUTF8($smtpChecked), Tools::htmlentitiesUTF8($smtpServer), Tools::htmlentitiesUTF8($content), Tools::htmlentitiesUTF8($subject), Tools::htmlentitiesUTF8($type), Tools::htmlentitiesUTF8($to), Tools::htmlentitiesUTF8($from), Tools::htmlentitiesUTF8($smtpLogin), Tools::htmlentitiesUTF8($smtpPassword), Tools::htmlentitiesUTF8($smtpPort), Tools::htmlentitiesUTF8($smtpEncryption));
|
||||
die($result === true ? 'ok' : $result);
|
||||
|
||||
|
||||
+12
-12
@@ -50,17 +50,18 @@ function verifyMail(testMsg, testSubject)
|
||||
{
|
||||
url: "ajax_send_mail_test.php",
|
||||
cache: false,
|
||||
type : "POST",
|
||||
data:
|
||||
"mailMethod="+(($("input[name=PS_MAIL_METHOD]:checked").val() == 2) ? "smtp" : "native")+
|
||||
"&smtpSrv="+ $("input[name=PS_MAIL_SERVER]").val()+
|
||||
"&testEmail="+ $("#testEmail").val()+
|
||||
"&smtpLogin="+ $("input[name=PS_MAIL_USER]").val()+
|
||||
"&smtpPassword="+ $("input[name=PS_MAIL_PASSWD]").val()+
|
||||
"&smtpPort="+ $("input[name=PS_MAIL_SMTP_PORT]").val()+
|
||||
"&smtpEnc="+ $("select[name=PS_MAIL_SMTP_ENCRYPTION]").val()+
|
||||
"&testMsg="+textMsg+
|
||||
"&testSubject="+textSubject
|
||||
,
|
||||
{
|
||||
"smtpSrv" : $("input[name=PS_MAIL_SERVER]").val(),
|
||||
"testEmail" : $("#testEmail").val(),
|
||||
"smtpLogin" : $("input[name=PS_MAIL_USER]").val(),
|
||||
"smtpPassword" : $("input[name=PS_MAIL_PASSWD]").val(),
|
||||
"smtpPort" : $("input[name=PS_MAIL_SMTP_PORT]").val(),
|
||||
"smtpEnc" : $("select[name=PS_MAIL_SMTP_ENCRYPTION]").val(),
|
||||
"testMsg" : textMsg,
|
||||
"testSubject" : textSubject
|
||||
},
|
||||
success: function(ret)
|
||||
{
|
||||
if (ret == "ok")
|
||||
@@ -77,5 +78,4 @@ function verifyMail(testMsg, testSubject)
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user