I am trying to send an email using mail function in php
. I have read the documentation and followed the examples but in vain. I don't know if I am doing anything wrong.
Can anyone please help me. I also followed other examples from the community without success.
And here also; Send email with PHP from html form on submit with the same script
Here is my code:
$name =array($_POST['name'],$_POST['email'],$_POST['phone'],$_POST['comments']);
$to = "fasdjgasgd@yahoo.com";
$subject = "Form submission";
$message = "$name[0] wrote the following: <br/> $name[3]";
$header = "FROM:".$name[1];
mail($to, $subject, $message, $header);