* Sunda Cyber Army 2k17 *
Indonesia Defacer ~
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// require 'class.phpmailer.php';
// require 'class.smtp.php';
// require 'class.pop3.php';
require __DIR__ .'/emailLib/vendor/autoload.php';
$json = array();
$mail = new PHPMailer;
// $mail->SMTPDebug = 2;
$mail->SMTPSecure = 'ssl';
$config = parse_ini_file("/home/triarc3/public_html/configurator/mailer_config.ini");
$mail->isSMTP(); // Set mailer to use SMTP
// $mail->Host = 'mail.triarcladders.com'; // Specify main and backup server
$mail->Host = 'yxqfs253.hostpapavps.net'; // Specify main and backup server
#$mail->Host = 'yxqfs253.hostpapavps.net';
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $config["username"]; // SMTP username
$mail->Password = $config["password"]; // SMTP password
echo $mail->Password . "<br>" . $config["password"];
$mail->Port = 465;
$mail->From = 'configurator@triarcladders.com';
$mail->FromName = 'TriArc Configurator';
// $mail->addAddress($config["recipient"]); // Add a recipient
$mail->addAddress('kamalashrafgill@gmail.com'); // Add a recipient
$mail->WordWrap = 80; // Set word wrap to 50 characters
$mail->isHTML(true); // Set email format to HTML
// $data = substr($_POST["image"], strpos($_POST["image"], ","));
// $encoding = 'base64';
// $type='image/png';
// $mail->addStringAttachment(base64_decode($data), 'Configuration.png', $encoding,$type);
// $data = substr($_POST["overviewImage"], strpos($_POST["overviewImage"], ","));
// $mail->addStringAttachment(base64_decode($data), 'TopDownConfiguration.png', $encoding,$type);
// $mail->Subject = 'Ladder Quote Request From '.$_POST["name"];
// $mail->Body = 'Customer Name: '.$_POST["name"].'<BR>Company Name: '.$_POST["company"].'<BR>Phone Number: '.$_POST["phone"].'<BR>Email: '.$_POST["email"].'<BR>Referrer:'.$_POST["referrer"].'<BR>Ship To Zipcode:'.$_POST["zipcode"].'<BR>Comments:'.$_POST["comments"].'<BR><BR>Parts:<BR>'.$_POST["parts"].'<BR><BR>';
$mail->Subject = 'Ladder Quote Request From ';
$mail->Body = 'Customer Name';
// echo "<pre>";
// print_r($mail);
// die;
$send = $mail->send();
// echo "<pre>";
// print_r($send);
// die;
//$send = 1;
if($send){
$json['status'] = 'success';
} else {
$json['status'] = 'failed';
}
echo json_encode($json);
exit();