$subject = "New Contact Us request";
$message = "
<html>
<head>
<title>Contact US</title>
</head>
<body>
<p>New Contact Us request</p>
<table border='1' width='100%' cellspacing='1' cellpadding='15'>
<tr>
<th style='text-align:left; width:25%'>Name</th>
<td>$name</td>
</tr>
<tr>
<th style='text-align:left'> Mobile</th>
<td>$mobile</td>
</tr>
<tr>
<th style='text-align:left'>Email< /th>
<td>$email</td>
</tr>
<tr>
<th style='text-align:left'> Message</th>
<td>$message</td>
</tr>
</table>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html; charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: <manikantak49@gmail.com> ' . "\r\n";
$headers .= 'Cc: standardservices2@gmail.com' . "\r\n";
if(mail($to,$subject,$message, $headers)){
echo "<script>alert('Your request submitted successfully')</script>";
}
0 comments:
Post a Comment