BUG 8847 The option mail php is disabled SOLVED

- I add option mail php to send mail
This commit is contained in:
Brayan Osmar Pereyra Suxo
2012-06-13 18:14:18 -04:00
parent be15de83e5
commit 37a7b5e091
3 changed files with 338 additions and 158 deletions

View File

@@ -346,6 +346,38 @@ class adminProxy extends HttpProxyController
G::LoadClass('net');
G::LoadThirdParty('phpmailer', 'class.smtp');
if ($_POST['typeTest'] == 'MAIL')
{
define("SUCCESSFUL", 'SUCCESSFUL');
define("FAILED", 'FAILED');
$mail_to = $_POST['mail_to'];
$send_test_mail = $_POST['send_test_mail'];
$_POST['FROM_NAME'] = $mail_to;
$_POST['FROM_EMAIL'] = $mail_to;
$_POST['MESS_ENGINE'] = 'MAIL';
$_POST['MESS_SERVER'] = 'localhost';
$_POST['MESS_PORT'] = 25;
$_POST['MESS_ACCOUNT'] = $mail_to;
$_POST['MESS_PASSWORD'] = '';
$_POST['TO'] = $mail_to;
$_POST['SMTPAuth'] = true;
try {
$resp = $this->sendTestMail();
} catch (Exception $error) {
$resp = new stdclass();
$reps->status = false;
$resp->msg = $error->getMessage();
}
if($resp->status){
echo '{"sendMail":true, "msg":"' . $resp->msg . '"}';
} else {
echo '{"sendMail":false, "msg":"' . $resp->msg . '"}';
}
die;
}
$step = $_POST['step'];
$server = $_POST['server'];
$user = $_POST['user'];