BUG 8847 The option mail php is disabled SOLVED
- I add option mail php to send mail
This commit is contained in:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user