我正在发送电子邮件wp_mail()
功能,但它不工作。它正在返回false。此外,它在服务器日志中没有给出任何错误。
这是我的代码:
$mailResult = false;
$to = "tayyabvohra@gmail.com";
$subject = "HUDPowerBid Mailgun Test exec on ";
$message = "Testing Mailgun at: ";
$mailResult = wp_mail( $to, $subject, $message, $headers);
$myarr= array(\'error\' => true, \'mail\' => $mailResult);
I have also tried with the above code and below code also I have tried with these two codes at once but nothing is working
$to1 = \'abc@gmail.com\';
$subject1 = \'Post Published by Author\';
$headers1 = \'From: admin <admin@urdutahzeeb.com>\' . "\\r\\n";
$message1 = \'your\';
$a=wp_mail($to1, $subject1, $message1, $headers1);
$my=array(\'checkstatus\'=>$a,\'second\'=>$mailResult);
echo json_encode($my);