%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
//ceha buro
include('../lib/include.php');
$formdata = $_POST['formdata'];
$keys = "`formdata`";
$values = "'" . $formdata . "'";
$insert_query = "INSERT INTO `tbl_career_form`(" . $keys . ") VALUES (" . $values . ")";
$insert_result = $ceha->query($insert_query);
$insert_id = $ceha->insert_id;
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';
$mail_adress = "insankaynaklari@cehaburo.com";
$mail_title = "CEHA'ya yeni bir iş başvurusu var !";
$mail_body = "Yeni bir iş başvurusu yapılmıştır. Detayları yönetim panelinizde görüntüleyebilirsiniz.<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;
$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("arda01@gmail.com", 'CEHA');
//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();
$return = array("status" => 1);
echo json_encode($return, true);
} catch (Exception $e) {
$return = array("status" => 0);
echo json_encode($return, true);
// echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
//save the $formdata to current directory as a json file time() . '.json'
$filename = time() . '.json';
$myfile = fopen($filename, "w") or die("Unable to open file!");
fwrite($myfile, $formdata);
fclose($myfile);
echo json_encode($return, true);
exit();