I trying to send an email from php using php mail() function.
Each time when I try to send an email it displays the error message.I don't know what went wrong.Here is my code. Can anyone tell me what went wrong ?
$message = "<html><body>";
    $message .= "<table rules='all'>";
    $message .= "<tr><td><strong>Name: Ramya</strong> </td></tr>";
    $message .= "<tr><td><strong>Email: ramyaroy</strong> </td></tr>";
    $message .= "</table>";
    $message .= "</body></html>";       
    $to = 'ramya@example.com';
    $email='vinay@example.net';
    $subject = 'Website Change Reqest';
    $headers = "From:".$email.PHP_EOL;
    $headers .= "Reply-To:".$email.PHP_EOL;
    $headers .= "MIME-Version: 1.0".PHP_EOL;
    $headers .= "Content-Type: text/html; charset=ISO-8859-1".PHP_EOL;
    if (mail($to, $subject, $message, $headers)) {
      echo 'Your message has been sent.';
    } else {
      echo 'There was a problem sending the email.';
    }
 
     
     
    