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 = "[email protected]";
$headers[] = "From:" . $from;
$send = wp_mail("[email protected]", "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.
$headers
and$header
spellt differently? I do not understand what you wnat to achieve with your conditional. It returns false if the email is sent?