WordPress uses custom wp_mail
function, so you won’t find it, if you’ll search for mail.You should find retrieve_password_message
filter call there. This is the filter that returns the content of reset password message.
// Change the message/body of the email
add_filter( 'retrieve_password_message', 'rv_new_retrieve_password_message', 10, 4 );
function rv_new_retrieve_password_message( $message, $key, $user_login, $user_data ){
/**
* Assemble the URL for resetting the password
* see line 330 of wp-login.php for parameters
*/
$reset_url = add_query_arg( array(
'action' => 'rp',
'key' => $key,
'login' => rawurlencode( $user_login )
), wp_login_url() );
ob_start();
printf( '<p>%s</p>', __( 'Hi, ' ) . $user_fname );
printf( '<p>%s</p>', __( 'It looks like you need to reset your password on the site. If this is correct, simply click the link below. If you were not the one responsible for this request, ignore this email and nothing will happen.' ) );
printf( '<p><a href="https://wordpress.stackexchange.com/questions/217980/%s">%s</a></p>', $reset_url, __( 'Reset Your Password' ) );
$message = ob_get_clean();
return $message;
}
In wp-login,You can find function that retrieve password.
/**
177 * Handles sending password retrieval email to user.
178 *
179 * @uses $wpdb WordPress Database object
180 *
181 * @return bool|WP_Error True: when finish. WP_Error on error
182 */
183 function retrieve_password() {}
I advice you please do not edit core files of WordPress use hook/filter in function.php file.I hope this will help you.