Shell File Manager
<?php
$log_status = $_GET['log_status'];
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
require 'vendor/autoload.php';
//get data from form
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$Model_Number = $_POST['Model_Number'];
$Serial_Number = $_POST['Serial_Number'];
$message = $_POST['message'];
// preparing mail content
$messagecontent =
"Good day " . $name . "
<br>
Thank you for purchasing a CamScan FZCO product. To ensure your product is an original CamScan FZCO product and under warranty kindly fill out the form below. You will hear back from us within 3 working days.
The details is following bellow.
<br><br>
Model Number is = " . $Model_Number . " <br>
Serial Number is= " . $Serial_Number . " <br>
<br>
Another Notes =" . $message;
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
// $mail->SMTPDebug = 2; //Enable verbose debug output
$mail->isSMTP();
$mail->Host = 'smtp.mail1.hostingplatform.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = '4$Wc8fYsJ2!%';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->setFrom($_POST['email'], $_POST['name']);
$mail->addAddress('[email protected] ', 'Support'); //Add a recipient
// $mail->SMTPAuth = true;
// $mail->SMTPSecure = "tls"; //Send using SMTP
// $mail->Host = 'smtp.mail1.hostingplatform.com'; //Set the SMTP server to send through
// $mail->Username = '[email protected]'; //SMTP username
// $mail->Password = '4$Wc8fYsJ2!%'; //SMTP password
// $mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
// //Recipients
// $mail->setFrom($_POST['email'], $_POST['name']);
// $mail->addAddress('[email protected] ', 'Support'); //Add a recipient
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = $subject;
$mail->Body = $messagecontent;
$mail->send();
header("Location:../warranty_verification.php?log_status=$log_status&success");
// header('Location: ../warranty_verification.php');
echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
?>
Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]