[-] BO : added the "mailMethod" variable

This commit is contained in:
aNiassy
2012-01-05 13:39:14 +00:00
parent a97b110a37
commit eda64add26
2 changed files with 6 additions and 6 deletions

View File

@@ -30,6 +30,7 @@ include_once(dirname(__FILE__).'/../config/config.inc.php');
/* Getting cookie or logout */
require_once(dirname(__FILE__).'/init.php');
$smtpChecked = (trim($_GET['mailMethod']) == 'smtp');
$smtpServer = $_POST['smtpSrv'];
$content = urldecode($_POST['testMsg']);
$subject = urldecode($_POST['testSubject']);
@@ -40,10 +41,8 @@ $smtpLogin = $_POST['smtpLogin'];
$smtpPassword = urldecode($_POST['smtpPassword']);
$smtpPort = $_POST['smtpPort'];
$smtpEncryption = $_POST['smtpEnc'];
if (isset($_POST['mailMethod']))
{
$smtpChecked = (trim($_POST['mailMethod']) == 'smtp');
$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);
}
$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);

View File

@@ -53,6 +53,7 @@ function verifyMail(testMsg, testSubject)
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(),