最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - WordPress isn't sending welcome email with the password reset

programmeradmin5浏览0评论

So I have been debugging the code:

$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
$message .= __('To set your password, visit the following address:') . "\r\n\r\n";
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";

$message .= wp_login_url() . "\r\n";

wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message);

If I remove the $message variable from wp_mail() and replace with with "hello" it sends fine, but if I use the message variable, I get no errors, it claims to have sent, but never actually gets sent.

What causes this, and how can I fix the $message variable?

发布评论

评论列表(0)

  1. 暂无评论