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/soniahjeweler.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>
<link rel="stylesheet" type="text/css" href="styles/contact.css">
<?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 = "smtp.titan.email"; // sets the SMTP server
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Set encryption to STARTTLS
$mail->Port = 587; // Use port 587 for TLS
$mail->Username = "$no_reply_email"; // SMTP account username
$mail->Password = "$no_reply_password"; // SMTP account password
$mail->SetFrom("$no_reply_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
$email_topic = "Thanks for contacting us";
$button_link = "$link/sign_in.php";
$button_text = "Login";
$message="";
include("email_header.php");
$message .= "
Dear $first_name,<br/><br/>
Thank you for reaching out to us! We have received your message and our team is already reviewing it. You will hear from us soon with an update.
<br/><br/>
The $company_name Team.<br/>
$email_logo
";
include("email_footer.php");
$mail->SetFrom("$no_reply_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>";
}
}
}
?>
<!-- breadcrumb__start -->
<div class="breadcrumb">
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="breadcrumb__title">
<h1>Contact us</h1>
<ul>
<li>
<a href="#">Home</a>
</li>
<li class="color__blue">
Contact
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- breadcrumb__end -->
<!-- contact__section__start -->
<div class="contactarea sp_top_80 sp_bottom_80">
<div class="container">
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-6 col-12">
<div class="contactarea__single">
<h3>Email Address</h3>
<p><?= $company_email ?></p>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-6 col-12">
<div class="contactarea__single">
<h3>Phone Number</h3>
<p><?= $company_phone ?></p>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-6 col-12">
<div class="contactarea__single">
<h3>Office Address </h3>
<p><?= $company_address ?></p>
</div>
</div>
</div>
</div>
</div>
<!-- contact__section__end -->
<!-- contactarea__form__area start -->
<div class="contactarea__form sp_bottom_80">
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="contactarea__form__area">
<h4 class="contactarea__form__title">Send Message</h4>
<?php echo"<h2>$msg</h2>"; ?>
<form id="contact-for" class="contact-form" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
<div class="row">
<div class="col-xl-6 col-lg-6 col-md-6 col-12">
<div class="contactarea__form__input">
<input type="text" placeholder="First name" class="" name="first_name" id="con_name" required>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-12">
<div class="contactarea__form__input">
<input type="text" placeholder="Last name" class="" name="last_name" id="con_name" required>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-12">
<div class="contactarea__form__input">
<input type="text" placeholder="Enter email address" class="" name="email" id="con_email" required>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-12">
<div class="contactarea__form__input">
<input type="text" placeholder="Enter subject" class="" name="subject" id="con_subject" required>
</div>
</div>
<div class="col-xl-12">
<div class="contactarea__form__input">
<textarea placeholder="Enter message" class="custom-textarea" name="message" id="con_message" required></textarea>
</div>
</div>
<div class='col-12'>
<?php include("captcha_end.php"); ?>
</div> <br>
<div class="col-xl-12">
<div class="contactarea__form__button">
<button type="submit" value="submit" class="default__button" name="send_message">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- contactarea__form__area end -->
<!-- contact__map__start -->
<div class="contact__map sp_bottom_80">
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="contact__map__inner">
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d29210.20802773719!2d90.43968000000001!3d23.773183999999997!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sbd!4v1723315989605!5m2!1sen!2sbd" height="550" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
</div>
</div>
</div>
</div>
<!-- contact__map__end -->
<?php include("footer.php"); ?>