Сайт на хостинге с cPanel. Почта используется с помощью biz.mail.ru. Помогите разобраться почему письма не отправляются.
Код в html:
<form method="post" action="sendmail.php">
<div class="field half first">
<label for="name">Name</label>
<input type="text" name="name" id="name" placeholder="Your Name" />
</div>
<div class="field half">
<label for="email">Email</label>
<input type="text" name="email" id="email" placeholder="your@mail.com" />
</div>
<div class="field">
<label for="subject">Subject</label>
<input type="text" name="subject" id="subject" placeholder="Subject..." />
</div>
<div class="field">
<label for="message">Message</label>
<textarea name="message" id="message" rows="4"></textarea>
</div>
<ul class="actions">
<li><input type="submit" value="Send Message" class="special" /></li>
<li><input type="reset" value="Reset" /></li>
</ul>
</form>
И файл sendmail.php
<?php
$to = "test@mydomain.com";
$email = $_REQUEST['email'] ;
$name = $_REQUEST['name'] ;
//$site = $_REQUEST['site'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
$headers = "test@mydomain.com";
$body = "From: $name \n\n Email: $email \n\n Message: $message";
$sent = mail($to, $subject, $body, $headers) ;
if($sent)
{echo "<script language=javascript>window.location = 'http://mydomain.com/#contact';</script>";}
else
{echo "<script language=javascript>window.location = 'http://mydomain.com/';</script>";}
?>