- Your IP: 216.73.216.124
- Server IP: 50.28.103.30
- Server: Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
- Server Software: nginx/1.28.0
- PHP Version: 8.3.12
-
Buat File |
Buat Folder
Edit File: validate_smtp.php
";
exit;
}
require 'fns/mailer/php_mailer/Exception.php';
require 'fns/mailer/php_mailer/PHPMailer.php';
require 'fns/mailer/php_mailer/SMTP.php';
$mail = new PHPMailer(true);
$recipient = $_POST["email"];
echo "";
echo "PROVIDED INFORMATION :
";
echo "Email Address : ".Registry::load('settings')->system_email_address."
";
echo "SMTP Host : ".Registry::load('settings')->smtp_host."
";
echo "SMTP Username : ".Registry::load('settings')->smtp_username."
";
echo "SMTP Password : ".Registry::load('settings')->smtp_password."
";
echo "SMTP Port : ".Registry::load('settings')->smtp_port."
";
echo "SMTP Protocol : ".strtoupper(Registry::load('settings')->smtp_protocol)."
";
echo "Recipient : ".$recipient."
";
echo "---------------------------------------
";
try {
if (Registry::load('settings')->smtp_authentication === 'enable') {
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->Host = Registry::load('settings')->smtp_host;
$mail->Username = Registry::load('settings')->smtp_username;
$mail->Password = Registry::load('settings')->smtp_password;
$mail->Port = Registry::load('settings')->smtp_port;
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
if (Registry::load('settings')->smtp_protocol === 'ssl') {
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
} else {
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
}
if (Registry::load('settings')->smtp_self_signed_certificate === 'yes') {
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$mail->SMTPSecure = false;
$mail->SMTPAutoTLS = false;
}
} else {
echo "
Error : SMTP Authentication is Disabled in Grupo Settings
";
}
$mail->addAddress($recipient);
$mail->Subject = 'Test Mail';
$mail->setFrom(Registry::load('settings')->system_email_address, Registry::load('settings')->sender_name);
$mail->isHTML(true);
$mail->Body = 'Hello, This is a Test Message.';
$mail->send();
} catch (Exception $e) {
echo "
ERROR LOG :
";
echo $mail->ErrorInfo;
if (Registry::load('settings')->smtp_protocol === 'ssl') {
echo "
SUGGESTION : Try with the following details :
";
echo "SMTP Portocol : TLS & SMTP Port : 587 or 25
";
}
}
echo "
---------------------------------------";
echo "
";
} else {
?>