Php wp_邮件在自定义wordpress插件文件中不起作用
我把我的邮件改成了wp_邮件,之后它就不再发邮件了,这是我的代码Php wp_邮件在自定义wordpress插件文件中不起作用,php,wordpress,Php,Wordpress,我把我的邮件改成了wp_邮件,之后它就不再发邮件了,这是我的代码 $subject='test mail'; $body = '<table><tr>test</tr></table>'; add_filter( 'wp_mail_content_type', 'set_html_content_type' ); $mail = wp_mail("test@mail.com","$subject", "$body"); remove_fil
$subject='test mail';
$body = '<table><tr>test</tr></table>';
add_filter( 'wp_mail_content_type', 'set_html_content_type' );
$mail = wp_mail("test@mail.com","$subject", "$body");
remove_filter( 'wp_mail_content_type', 'set_html_content_type' );
function set_html_content_type()
{
return 'text/html';
}
很好用here@BhumiShah是否有任何文件或其他我必须调用或执行的操作?不,您的代码在我的wordpress中运行良好。@BhumiShah smtp是否需要?
if($mail)
{
echo "done";
}
else
{
echo "no";
}