[-] BO : modified the treatment in order to add specials characters like password in Preferences/Emails
This commit is contained in:
1 parent
d8238b007e
commit
622f5c73c2
2 files changed
+20
-21
No files matched your search
@@ -30,18 +30,17 @@ include_once(dirname(__FILE__).'/../config/config.inc.php');
|
|||||||
/* Getting cookie or logout */
|
/* Getting cookie or logout */
|
||||||
require_once(dirname(__FILE__).'/init.php');
|
require_once(dirname(__FILE__).'/init.php');
|
||||||
|
|
||||||
$smtpChecked = (trim($_GET['mailMethod']) == 'smtp');
|
$smtpChecked = (trim($_POST['mailMethod']) == 'smtp');
|
||||||
$smtpServer = $_GET['smtpSrv'];
|
$smtpServer = $_POST['smtpSrv'];
|
||||||
$content = $_GET['testMsg'];
|
$content = $_POST['testMsg'];
|
||||||
$subject = $_GET['testSubject'];
|
$subject = $_POST['testSubject'];
|
||||||
$type = 'text/html';
|
$type = 'text/html';
|
||||||
$to = $_GET['testEmail'];
|
$to = $_POST['testEmail'];
|
||||||
$from = Configuration::get('PS_SHOP_EMAIL');
|
$from = Configuration::get('PS_SHOP_EMAIL');
|
||||||
$smtpLogin = $_GET['smtpLogin'];
|
$smtpLogin = $_POST['smtpLogin'];
|
||||||
$smtpPassword = $_GET['smtpPassword'];
|
$smtpPassword = $_POST['smtpPassword'];
|
||||||
$smtpPort = $_GET['smtpPort'];
|
$smtpPort = $_POST['smtpPort'];
|
||||||
$smtpEncryption = $_GET['smtpEnc'];
|
$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));
|
$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);
|
die($result === true ? 'ok' : $result);
|
||||||
|
|
||||||
+11
-11
@@ -50,17 +50,18 @@ function verifyMail(testMsg, testSubject)
|
|||||||
{
|
{
|
||||||
url: "ajax_send_mail_test.php",
|
url: "ajax_send_mail_test.php",
|
||||||
cache: false,
|
cache: false,
|
||||||
|
type : "POST",
|
||||||
data:
|
data:
|
||||||
"mailMethod="+(($("input[name=PS_MAIL_METHOD]:checked").val() == 2) ? "smtp" : "native")+
|
{
|
||||||
"&smtpSrv="+ $("input[name=PS_MAIL_SERVER]").val()+
|
"smtpSrv" : $("input[name=PS_MAIL_SERVER]").val(),
|
||||||
"&testEmail="+ $("#testEmail").val()+
|
"testEmail" : $("#testEmail").val(),
|
||||||
"&smtpLogin="+ $("input[name=PS_MAIL_USER]").val()+
|
"smtpLogin" : $("input[name=PS_MAIL_USER]").val(),
|
||||||
"&smtpPassword="+ $("input[name=PS_MAIL_PASSWD]").val()+
|
"smtpPassword" : $("input[name=PS_MAIL_PASSWD]").val(),
|
||||||
"&smtpPort="+ $("input[name=PS_MAIL_SMTP_PORT]").val()+
|
"smtpPort" : $("input[name=PS_MAIL_SMTP_PORT]").val(),
|
||||||
"&smtpEnc="+ $("select[name=PS_MAIL_SMTP_ENCRYPTION]").val()+
|
"smtpEnc" : $("select[name=PS_MAIL_SMTP_ENCRYPTION]").val(),
|
||||||
"&testMsg="+textMsg+
|
"testMsg" : textMsg,
|
||||||
"&testSubject="+textSubject
|
"testSubject" : textSubject
|
||||||
,
|
},
|
||||||
success: function(ret)
|
success: function(ret)
|
||||||
{
|
{
|
||||||
if (ret == "ok")
|
if (ret == "ok")
|
||||||
@@ -78,4 +79,3 @@ function verifyMail(testMsg, testSubject)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user