Iam new to php coding. I have tried to send an email from an html page.It is redirected to my 'email.php', but it doesn,t send email.My code is here..
<?php
//if "email" is filled out, send email
//send email
$name = $_REQUEST['your-name'] ;
$email = $_REQUEST['your-email'] ;
$company= $_REQUEST['company'] ;
$website= $_REQUEST['website'] ;
$message=$name."<br>".$company."<br>".$website."<br>".$email;
$subject = 'Hai there' ;
$message = $_REQUEST['message'] ;
mail("sample@gmail.com", $subject,
$message, "From:" . $email);
if(mail()){
echo 'successfull';
}
else{
echo 'not successfull';
}
?>
It always shows 'not successful'.