Server : LiteSpeed System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64 User : u615232177 ( 615232177) PHP Version : 8.1.33 Disable Function : NONE Directory : /home/u615232177/domains/sabrinaluxebraidedwigs.com/public_html/ |
<?php use PHPMailer\PHPMailer\PHPMailer;use PHPMailer\PHPMailer\Exception;use PHPMailer\PHPMailer\SMTP; session_start();
$page_name = basename($_SERVER['PHP_SELF']);
include("header.php"); ?>
<title><?php echo $company_name; ?>, Contact us</title>
<?php
$msg='';$captcha_error=""; $errors=0;;
if (isset($_POST["send_message"])) {
//include("captcha_start.php");
if($errors == 0){
$subject = mysqli_real_escape_string($con,$_POST['subject']);
$last_name = mysqli_real_escape_string($con,$_POST['last_name']);
$first_name = mysqli_real_escape_string($con,$_POST['first_name']);
$email = mysqli_real_escape_string($con,$_POST['email']);
$message1 = mysqli_real_escape_string($con,$_POST['message']);
$msg = '';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
require 'PHPMailer/src/Exception.php';
$mail = new PHPMailer();
//$mail->IsSMTP(); // telling the class to use SMTP
//$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "localhost"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "$no_reply_email"; // SMTP account username
$mail->Password = "$no_reply_password"; // SMTP account password
$mail->SetFrom("$company_email", "$company_name");//Use a fixed address in your own domain as the from address
$mail->AddReplyTo("$email","$email"); //Put the submitter's address in a reply-to header
$mail->Subject = "$subject";
$mail->MsgHTML("<html><body>$message1</body></html>");
$mail->AddAddress("$company_email", "Contact Form");//Send the message to yourself, or whoever should receive contact for submissions
//$mail->AddAttachment(""); // attachment
if(!$mail->Send()) {
//echo "Mailer Error: " . $mail->ErrorInfo;
$msg = "<div class='alert alert-danger'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Something went wrong, please try again</b>
</div>";
}
else {
$msg = "<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Email Sent</b>
</div>";
}
//email an autoresponse to the person too
$mail->clearAddresses();
$mail->clearReplyTos();
$subject1 = "Thanks for contacting us"; // form field
$message="";
include("email_header.php");
$message .= "
Dear $first_name,<br/><br/>
Thank you for contacting our support team. Your request is in progress and is being worked on by our service team. We are prioritizing your request and will notify you via email.
<br/><br/>
The $company_name Team.<br/>
$email_logo
";
include("email_footer.php");
$mail->SetFrom("$company_email", "$company_name");//Use a fixed address in your own domain as the from add
$mail->AddAddress("$email", "$email");//Send the message to yourself, or whoever should receive contact for submissions
$mail->AddReplyTo("$company_email", "$company_name"); //Put the submitter's address in a reply-to header
$mail->Subject = "$subject1";
$mail->MsgHTML("<html><body>$message<br></body></html>");
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
$msg = "Email not sent, please try again Mailer Error: ".$mail->ErrorInfo;
}
else {
//echo "Thanks for getting in touch, we will get back to ASAP";
$msg = "<span style='color:steelblue;'>Hey $first_name thanks for getting in touch with us, we will get back to you very shortly!</span>";
}
}
}
?>
<!-- Title Page -->
<section class="bg-title-page p-t-40 p-b-50 flex-col-c-m" style="background-image: url(images/banner-min.jpg);">
<h2 class="l-text2 t-center">
<div class='space_top'></div>
Contact us
</h2>
</section>
<!-- content page -->
<section class="bgwhite p-t-66 p-b-60">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="p-r-20 p-r-0-lg">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d387191.0360697132!2d-74.30932960709077!3d40.697539963305694!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c24fa5d33f083b%3A0xc80b8f06e177fe62!2sNew%20York%2C%20NY%2C%20USA!5e0!3m2!1sen!2sng!4v1700168015815!5m2!1sen!2sng" height="450" style="border:0;width:100%;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
</div>
<div class="col-md-6">
<form class="leave-comment" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method='post'>
<h4 class="m-text26 p-b-36 p-t-15">
Send us your message
<?php echo"<br/>$msg";?>
</h4>
<div class="bo4 of-hidden size15 m-b-20">
<input class="sizefull s-text7 p-l-22 p-r-22" type="text" name="first_name" placeholder="First Name"required>
</div>
<div class="bo4 of-hidden size15 m-b-20">
<input class="sizefull s-text7 p-l-22 p-r-22" type="text" name="last_name" placeholder="Last Name"required>
</div>
<div class="bo4 of-hidden size15 m-b-20">
<input class="sizefull s-text7 p-l-22 p-r-22" type="text" name="subject" placeholder="Subject"required>
</div>
<div class="bo4 of-hidden size15 m-b-20">
<input class="sizefull s-text7 p-l-22 p-r-22" type="email" name="email" placeholder="Email Address"required>
</div>
<textarea class="dis-block s-text7 size20 bo4 p-l-22 p-r-22 p-t-13 m-b-20" name="message" placeholder="Message"required></textarea>
<div class="w-size25">
<!-- Button -->
<button name='send_message' type='submit' class="flex-c-m size2 bg1 bo-rad-23 hov1 m-text3 trans-0-4">
Send
</button>
</div>
</form>
</div>
</div>
</div>
</section>
<?php include("footer.php"); ?>