I wrote the following code for sending email to my E-mail address from my site.
But it doesn't work.
I used the following HTML Form in the contact page in my site.
<?php
if(isset($_POST['submit'])) {
        $to ="amishaharali@gmail.com";
        $subject = "E-mail from Ushar Alo Contact Person";
        $txt = $_POST['comment']." -by :".$_POST['mail'];
$headers = "From: msalipbl@gmail.com";
        if(mail($to,$subject,$txt,$headers)){
                echo "Successfully sent!";
                }else{
                echo " Sorry! a problem to send the E-mail!";
                }
}else{
?>
        <hr/>
        <h3>Send e-mail to the Administrator :</h3>
        <form action="http://usharalo.eu.pn/contact.php" method="post">
        Name:<br>
        <input type="text" name="name"><br>
        E-mail:<br>
        <input type="text" name="mail"><br>
        Comment:<br>
        <input type="text" name="comment" size="50"><br><br>
        <input type="submit" name ="submit" value="Send">
        <input type="reset" name="reset" value="Reset">
        </form>
<?php } ?>
