Shell File Manager
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
$mail = new PHPMailer;
if (isset($_POST['submit'])) {
// php code
$name = $_POST['name'];
$email = $_POST['email'];
$data = $_POST['data'];
?>
<?php
// $mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'mail1.hostingplatform.com;smtp.camscan.ca'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '[email protected]'; // SMTP username
$mail->Password = '4$Wc8fYsJ2!%'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->From = '[email protected]';
$mail->FromName = 'CamScan FZCO Support';
$mail->addAddress('[email protected]', 'Support'); // Add a recipient
$mail->addReplyTo($email, $name);
$mail->addCC($email, $name);
$mail->WordWrap = 50; // Set word wrap to 50 characters
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Warranty Verification';
$body = '
Good day ' . $name . ' <br>
Thank you for purchasing a CamScan FZCO product. We are checking the serial numbers that you provided, you will hear back from us within 3 working days.
<html>
<head>
<style>
table, th, td {
border: 1px solid green;
border-collapse: collapse;
}
</style>
</head>
<body>
The details is following bellow.<br><br>
<strong> Name : </strong> ' . $name . '<br>
<strong> Email : </strong> ' . $email . '<br><br>
<table>
<tr style="border: 1px solid blue">
<th style="width:50%" > Model Number </th>
<th style="width:50%" > Serial Number </th>
</tr>';
foreach ($data as $key => $retrive) {
$body .= "<tr><td>" . $retrive['Model_Number'] . "</td><td>" . $retrive['Serial_Number'] . "</td></tr>";
}
$mail->Body = $body . '</table></body></html>
<br>
<h4> Thankyou, CamScan FZCO Team </h4>
+1-613-484-2847<br>
[email protected] <br>
';
if (!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
$alert = 'Email Sent Successfully ! You will hear back from us within 3 working days.';
// echo 'Message has been sent';
}
}
Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]