I have a simple code, which should echo 1 if the mail is sent or 0 if it doesn't. But I am getting error 500. I tried changing the email, but it didn't work. Please suggest a fix.
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container-fluid">
<h1>Emails:</h1>
<p>
<?php
$to = "myemail@gmail.com"
$subject = "Subject";
$message = "This is a message";
echo mail($to, $subject, $message);
?>
</p>
</div>
</body>
</html>