Send email using domain server email with PHP
<p>.hi guys can anyone guide me on how to create a PHP form that sends an email to a desired recipient using the email provided by my domain server.</p>

<pre><code>&lt;?php

if($_POST['submit'])
{
    $name = $_POST['name'];
    $message = $_POST['message'];

    if($name&amp;&amp;$message)
    {
        $namelen = 20;
        $messagelen = 300;
        if(strlen($name)&lt;=$namelen&amp;&amp;strlen($message)&lt;=$messagelen)
        {
            $to = "myemail@yahoo.com";
            $subject = "Test Email";
            $headers = "From: my server provided email here";

            ini_set("SMTP", "/*i placed my domain server here");

            $body = "This is an email from $name\n\n$message";

            mail($to, $subject, $body, $headers);
            die();
        }
        else
        die("Max length for name is $namelen, and max length for message is $messagelen.");
    }
    else
    die("You must enter a name &lt;u&gt;and&lt;/u&gt; message");
    /*echo $name.' '.$message;*/
}
?&gt;


&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form action='mailpush.php' method='POST'&gt;
    Name:&lt;input type='text' name='name' maxlength='20'&gt;&lt;br&gt;
    Message:&lt;br /&gt;&lt;textarea name='message'&gt;&lt;/textarea&gt;&lt;p&gt;
    &lt;input type='submit' name='submit' value='Send me this'&gt;&lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>.this is the code i have so far. but when i try to send i don't receive anything.</p>
