I am breaking my head from last 1 hour but not getting any idea that what’s going wrong with my code…
I am developing my own plugin and I am using wp_mail()
function for sending mail in that but it’s not sending mail it seems.
I tried to use PHP Mailer which is working fine but I want to use wp_mail()
.. this is my code..
$from = "abc@gmail.com";
$headers[] = "From:" . $from;
$send = wp_mail("myemail@gmail.com", "hiii", "hiiii",$headers);
if($send) {
echo "send";
return false;
} else {
echo $send;
return true;
}
Can any body help me to figure out my mistake… I am testing it on my server only…
Thanks in advance.