%PDF-1.4 %Óëéá 1 0 obj <> endobj 3 0 obj <> endobj 4 0 obj <
| Server IP : 212.252.79.165 / Your IP : 216.73.216.24 [ Web Server : Apache System : Linux 212-252-79-165.cprapid.com 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 User : cehaburo ( 1001) PHP Version : 8.1.33 Disable Function : exec,passthru,shell_exec,system Domains : 48 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/cehaburo/public_html/inc/ |
Upload File : |
<?php include('../lib/include.php'); ?>
<?php
//ceha buro
function insertSubscriber($mail)
{
global $ceha;
$query = "SELECT count(*) FROM `tbl_subscriber` WHERE `mail`='$mail' AND `active`=1";
$result = $ceha->query($query);
$row = $result->fetch_assoc();
if ($row["count(*)"] == 0) {
$ceha->query("INSERT INTO `tbl_subscriber`(`mail`) VALUES ('$mail')");
return "1";
} else {
return "0";
}
}
?>
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
require 'phpmailler/src/Exception.php';
require 'phpmailler/src/PHPMailer.php';
require 'phpmailler/src/SMTP.php';
if (isset($_GET['status'])) {
// exit();
$mail_adress = "info@cehaburo.com";
if ($_GET['status'] == 1) {
$subscriber = $_GET['subscriber'];
$result = insertSubscriber($subscriber);
if ($result == "1") {
$mail_title = "Bültende yeni bir abone var !";
$mail_body = "E-Mail Adresi : $subscriber<br>";
$return = array("status" => 1);
} else {
$return = array("status" => 0);
echo json_encode($return, true);
exit();
}
}
if ($_GET['status'] == 2) {
$name = $_GET['name'];
$sender_mail = $_GET['mail'];
$subject = $_GET['subject'];
$message = $_GET['message'];
$current_date_str_in_tr = date("d.m.Y");
$mail_title = "CEHA'dan bir mesajınız var | $current_date_str_in_tr";
$mail_body = "Mesaj bırakan kişinin ,<br>";
$mail_body .= "Adı :$name ,<br>";
$mail_body .= "Mail Adresi :$sender_mail ,<br>";
$mail_body .= "Mesajın Konusu :$subject ,<br>";
$mail_body .= "Mesaj :$message <br>";
}
//Instantiation and passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTPDebug = 0; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->CharSet = 'UTF-8';
$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = "noreply.cehamailler@gmail.com"; // Use environment variables
$mail->Password = "zmmnzmicffwxjyug"; // Use environment variables
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
//Recipients
$mail->setFrom('noreply.cehamailler@gmail.com', 'CEHA - Secure Mailer');
$mail->addAddress($mail_adress, 'CEHA'); //Add a recipient
// $mail->addBCC( "info@cehacanada.com", 'CEHA'); //Add a recipient ADD BCC
// $mail->addBCC( "info@cehausa.com", 'CEHA'); //Add a recipient ADD BCC
$mail->addBCC( "arda01@gmail.com", 'CEHA'); //Add a recipient ADD BCC
// $mail->addAddress("arda01@gmail.com", 'CEHA');
if (isset($_GET['status'])) {
if ($_GET['status'] == 1) {
$mail->addAddress($subscriber, 'CEHA'); //Add a recipient
}
}
//Content
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = $mail_title;
$mail->Body = $mail_body;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
// $send = $mail->send();
if ($mail->send()) {
$return = array("status" => 1);
} else {
$return = array("status" => 0);
}
echo json_encode($return, true);
exit();
} catch (Exception $e) {
$return = array("status" => 0);
echo json_encode($return, true);
exit();
// echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
echo json_encode($return, true);
exit();
}