rendered paste body<?PHP
if (isset($_POST['from']) && isset($_POST['subject']) && isset($_POST['body'])){
$to = "admin@site.com";
$subject = $_POST['subject'];
$body = $POST['body'];
$headers = "FROM:" . $_POST['from']
$sent = mail($to, $subject, $body, $headers);
if $sent{
echo "Message successfully sent. Expect a reply within 5 business days."
}else{
echo "Message sending failed. Please try again later."
}}else{?>
<html>
<head>
<title>Submit Query</title>
</head>
<body>
<center><h2>Submit Query</h2></center>
<form action='' method='post'>
<table align='center'>
<tr><td>Your email address: </td><td><input name='from' /></td></tr>
<tr><td>Subject: </td><td><input name='subject' /></td></tr>
</table>
<br />
<table align='center' width='60%'>
<tr><td>Query Details.</td></tr>
<tr><td align='center'><textarea rows='5' cols='40' name='body'>
Please explain your problem here:
</textarea></td></tr>
</table>
<input type='hidden' name='type' value='true' />
<center><input type='submit' value='Submit' /></center>
</form>
<?PHP }
?>