File: /home/u503286720/domains/credentconstruction.com/public_html/mailer.php
<?php
if (isset($_POST['butn1'])) {
$name = $_POST['uname'];
$email = $_POST['email'];
$subject= $_POST['sub'];
$mail_to="info@rkcivil.in";
$emailSendMessage = $_POST['msg'];
$message = "<html>
<body>
<h1>Contact Enquiry</h1>
<p><b>Username</b>: ".$name."</p>
<p><b>Email</b>: ".$email."</p>
<p><b>Subject</b>: ".$subject."</p>
<p><b>Message</b>: ".$emailSendMessage."</p>
</body>
</html>";
$headers = "MIME-Version: 1.0\r\n";
$headers = "Content-Type: text/html; charset=UTF-8\r\n";
$headers .= 'From: '.$name."\r\n".
'Reply-To: '.$email."\r\n" .
'X-Mailer: PHP/' . phpversion();
$mail_status = mail($mail_to, $subject, $message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'contact.php';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to info@rkcivil.in');
window.location = 'contact.php';
</script>
<?php
}
}
?>
<?php
if (isset($_POST['career-btn'])) {
$name = $_POST['uname'];
$email = $_POST['email'];
$pos= $_POST['position'];
$mail_to="info@rkcivil.in";
$subject="Career Enquiry";
$emailSendMessage = $_POST['msg'];
$message = "<html>
<body>
<h1>Career Enquiry</h1>
<p><b>Username</b>: ".$name."</p>
<p><b>Email</b>: ".$email."</p>
<p><b>Job Position</b>: ".$pos."</p>
<p><b>Message</b>: ".$emailSendMessage."</p>
</body>
</html>";
$headers = "MIME-Version: 1.0\r\n";
$headers = "Content-Type: text/html; charset=UTF-8\r\n";
$headers .= 'From: '.$name."\r\n".
'Reply-To: '.$email."\r\n" .
'X-Mailer: PHP/' . phpversion();
$mail_status = mail($mail_to, $subject, $message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for Your message. Please, send your Resume to info@rkcivil.in. We will contact you shortly.');
window.location = 'careers.php';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to info@rkcivil.in');
window.location = 'careers.php';
</script>
<?php
}
}
?>