Viewing File: /home/webrbaew/candycleansestore.co/ajaxemail.php
<?php
if(isset($_POST['submit_contact'])) {
//print_r($_POST); exit;
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$message_text=$_POST['message'];
$to = 'info@candycleansestore.co';
$from = $email;
$subject = 'Candy Cleanse - Contact Us';
$message = '
<html>
<body>
<table cellspacing="0" style="padding:15px;border: 2px dashed #edb509; width: 100%;border-collapse: collapse;">
<tr>
<th style="padding:20px; !important;">Name:</th><td style="padding: 8px;border: 1px solid #ddd;">'.$name.'</td>
</tr>
<tr style="background-color: #e0e0e0;">
<th style="padding:20px; !important;">Email:</th><td style="padding: 8px;border: 1px solid #ddd;">'.$email.'</td>
</tr>
<tr>
<th style="padding:20px; !important;">Phone:</th><td style="padding: 8px;border: 1px solid #ddd;">'.$phone.'</td>
</tr>
<tr>
<th style="padding:20px; !important;">Message:</th><td style="padding: 8px;border: 1px solid #ddd;">'.$message_text.'</td>
</tr>
</table>
</body>
</html>';
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
$headers .= 'From: ' . $from . "\r\n";
$headers .= 'Cc: candycleansestore@gmail.com' . "\r\n";
mail($to,$subject,$message,$headers);
echo "submitted";
exit();
//echo ($send_email) ? 'success' : 'error';
}
?>
Back to Directory
File Manager