$message = __('Someone requested that the password be reset for the following account:') . "rnrn";
$message .= network_home_url( '/' ) . "rnrn";
$message .= sprintf(__('Username: %s'), $user_login) . "rnrn";
$message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "rnrn";
$message .= __('To reset your password, visit the following address:') . "rnrn";
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">rn";
The email I got link without wp-login.php
Someone requested that the password be reset for the following
account:Username: test12
If this was a mistake, just ignore this email and nothing will happen.
To reset your password, visit the following address:
<http://localhost.com?action=rp&key=$P$Btka6BPNxTtMA2ohCF4bLMwaQ0pXHc/&login=test12>
I debugged and found that system is checking if link having wp-login.php then remove this file name from link and send mail. Is there any file in which we can check?
I had the same problem. For me the solution was to parse mail as html. I added this into functions and it works now.
First function changes header of all emails to
text/html
.Second function changes the
rn
line breaks for<br />
ones.