I’m trying to test wp_mail() in my local.
When I var dump wp_mail,I get Boolean false.This is my code
$to = "abcd@gmail.com";
$subject="my subject";
$message="I would like to work with you";
$headers="";
$sent_message = wp_mail( $to, $subject, $message, $headers);
var_dump($sent_message); // i get boolean false here.
if ( $sent_message ) {
echo 'The test message was sent. Check your email inbox.';
} else {
echo 'The message was not sent!'; //this gets printed in d end.
}
Any help would be appreciated.