$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$from = "[email protected]";
$headers = "From:" . $from;
mail($to, $subject, $message,$headers);
if(mail($to, $subject, $message,$headers))
echo 1;
else{
echo 2;
}
I have tried this and it is not on localhost.it is not working.is there any way to show what is the error ? is there any need to be change the setting in php.ini?