function mailto(){
$to = strip_tags($_POST['email']);
$subject = " Contact us form";
$headers = "From: muthunce@gmail.com \r\n";
$headers .= "Reply-To: muthunce@gmail.com \r\n";
$headers .= "CC: \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '<html><body>';
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= "<tr style='background: #eee;'><td><strong>Name:</strong> </td><td>" . strip_tags($_POST['name']) . "</td></tr>";
$message .= "<tr><td><strong>Email:</strong> </td><td>". strip_tags($_POST['email']) ."</td></tr>";
$message .= "<tr><td><strong>Category:</strong> </td><td>" . strip_tags($_POST['category']) . "</td></tr>";
$message .= "<tr><td><strong>Subject:</strong> </td><td>" . strip_tags($_POST['subject']) . "</td></tr>";
$message .= "<tr><td colspan=\"2\"><strong>Message:</strong>Hi " . strip_tags($_POST['description']) . "</td></tr>";
$message .= "</table>";
$message .= "</body></html>";
mail($to, $subject, $message, $headers);
}
mailto();
No comments:
Post a Comment
comment here