In some cases, you might want to verify that mail() works on your server.
To confirm that PHP Mail() works, you could create a PHP file with the following contents, making sure to replace the destination email address names as necessary.
$dest = "email@example.com";
$fromaddy = "firstname.lastname@example.org";
mail("<$dest>","Test from php mail","Test","From:<$fromaddy>","-f$fromaddy");
From there, open the file in a web browser top send the message.
For more information, please see the documentation from php.net: https://www.php.net/manual/en/function.mail.php