I have use mail function like this work well in windows but not in linux server.what's wrong with my code..anyone can give some ideas/better one solution for this.I am also have refer some SMTP option but that all throw error while run time.
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
$email_recipient = "staff@inpws.com";
$email_subject="hi";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: info@oktakes.com\r\n";
$headers .= "Reply-To: info@oktakes.com";
$email_result = mail($email_recipient, $email_subject, "hiuu", $headers);
if ($email_result){ echo "Email has been sent!"; }
else{ echo "Email has failed!"; }
?>