PHP appends localhost to out-going email
<p>Here's a PHP code that I'm using to test email sending for one of my forms. Although it works well, but for some reason it appends 
@localhost.mydomain.com to the sender email address. Here's an example:</p>

<pre><code>From: James &lt;james.bond@hotmail.com@localhost.mydomain.com&gt;
</code></pre>

<p>Here's the full code below.</p>

<pre><code>&lt;?php
       $email = sqlEscape($_POST['email']);
       $name  = sqlEscape($_POST['name']);
       $to = 'me@yahoo.com';
       $subject = 'Email From website';
       $message = 'The message here';

        $headers = 'From: "'.$name.'" &lt;"'.$email.'"&gt;' . "\n";
        $headers .= 'MIME-Version: 1.0' . "\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";

        if(mail($to, $subject, $message, $headers)){                            

            echo('Message sent successfully');                      
        }else{
            echo('&lt;a href="contact.php"&gt;Click here&lt;/a&gt; to try again.');     
        }
?&gt;
</code></pre>

<p>Is there a way to make it not to append it? Thanks</p>
