AlkantarClanX12
| Current Path : /home/xdlcxzbz/public_html/ |
| Current File : //home/xdlcxzbz/public_html/email.php |
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require 'Email_Package/vendor/autoload.php';
$mail = new PHPMailer(true);
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
try {
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'xdlcouriers@gmail.com';
$mail->Password = 'qbifnawbnfdszulo';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
$mail->setFrom('xdlcouriers@gmail.com', 'XDL Couriers');
$mail->addAddress('xdlcouriers@gmail.com', 'XDL Couriers');
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = "<b>Name: </b>".$name;
$mail->Body .= "<br><b>Email: </b>".$email;
$mail->Body .= "<br><b>Message: </b>".$message;
$mail->Body .= "<br><b>Note:</b> <i>If you have any questions or need assistance, please visit our website or contact our customer support team.</i><br><br><hr>";
$mail->Body .= "© 2023 Powered by KickStart Marketing</a>, Contact: +44 7447 966344";
$mail->send();
echo'<head>
<style>
h1 {
text-align: center;
margin-top: 100px;
}
.button-container {
text-align: center;
margin-top: 20px;
}
.custom-button {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-align: center;
text-decoration: none;
font-size: 16px;
border: none;
cursor: pointer;
border-radius: 4px;
}
</style>
</head>';
echo ' <h1>Your Message Has Been Sent</h1>
<div class="button-container">
<a href="contact.html"><input type="button" value="Go Back" class="custom-button"/></a>
</div>';
} catch (Exception $e) {
echo "Message could not be sent";
}
?>