无法使用以下wp_mail函数发送电子邮件。我该如何解决?
wp_mail($email_address,'Welcome!','Your password'.$password);
答案 0 :(得分:0)
您似乎缺少一些必需的元素。正如WordPress Codex(https://codex.wordpress.org/Function_Reference/wp_mail)所述,你需要至少有一个"到","主题"和#34;消息"。
Codex示例:
<?php wp_mail( 'me@example.net', 'The subject', 'The message' ); ?>
我不确定您要使用&#34;密码&#34;您的示例的一部分,但您可能没有使用正确的WordPress功能?