[-] BO : added the "mailMethod" variable
This commit is contained in:
@@ -30,6 +30,7 @@ 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');
|
||||||
$smtpServer = $_POST['smtpSrv'];
|
$smtpServer = $_POST['smtpSrv'];
|
||||||
$content = urldecode($_POST['testMsg']);
|
$content = urldecode($_POST['testMsg']);
|
||||||
$subject = urldecode($_POST['testSubject']);
|
$subject = urldecode($_POST['testSubject']);
|
||||||
@@ -40,10 +41,8 @@ $smtpLogin = $_POST['smtpLogin'];
|
|||||||
$smtpPassword = urldecode($_POST['smtpPassword']);
|
$smtpPassword = urldecode($_POST['smtpPassword']);
|
||||||
$smtpPort = $_POST['smtpPort'];
|
$smtpPort = $_POST['smtpPort'];
|
||||||
$smtpEncryption = $_POST['smtpEnc'];
|
$smtpEncryption = $_POST['smtpEnc'];
|
||||||
if (isset($_POST['mailMethod']))
|
|
||||||
{
|
$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));
|
||||||
$smtpChecked = (trim($_POST['mailMethod']) == 'smtp');
|
die($result === true ? 'ok' : $result);
|
||||||
$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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ function verifyMail(testMsg, testSubject)
|
|||||||
type : "POST",
|
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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user