Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?

If you have a custom login page already, you may not want to introduce a whole new plugin. You can change ‘from’ name and email with these simple functions in your theme or plugin.

To change the name

add_filter( 'wp_mail_from_name', 'custom_wpse_mail_from_name' );
function custom_wpse_mail_from_name( $original_email_from ) {
    return 'Yours Truly';
}

To change the email

add_filter( 'wp_mail_from', 'custom_wpse_mail_from' );
function custom_wpse_mail_from( $original_email_address ) {
    return '[email protected]';
}

If you want to use the same email address everywhere, you can simply set that in the general settings and change the name only. If you want to change it for just the password recovery, there are resets for the above functions that will return in to it’s default settings. It’s all in the codex. Here are a couple links to get you in the right direction:

https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from_name

https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from

Related Posts:

  1. Right practice to edit WP reset password email
  2. Cant login, Password MUST be reset error, after reset
  3. How to login with email only no username?
  4. Check for correct username on custom login form
  5. What are the differences between wp_users and wp_usermeta tables?
  6. Editing ‘Password Reset’ E-mail
  7. How can I send a welcome email to a user AFTER they login for the first time?
  8. Customize wp_new_user_notification_email()
  9. Login email after registration never sent or received
  10. Add Confirm Password field in wp-login.php Password Reset page
  11. How can I modify the default reset (lost) password email text?
  12. How to customise wp-login.php only for users who are setting a password for the first time?
  13. Give visitor access to password protected page/post via external script
  14. Send reset password link to user from custom lost password form
  15. How can I retrieve the username and password from my WordPress installation?
  16. password protect individual pages
  17. Problem with logging in WP users automatically
  18. How to determine if a user has not changed default generated password
  19. Private page protected with username and password
  20. reset password link redirect to login page
  21. Password protect media attachment – share across guests
  22. Password reset – Disabled for LDAP accounts
  23. Why wp_update_user doesn’t update user_activation_key on users with apostrophes in their email?
  24. Forgot Password/ Password Reset Page does not exist
  25. Correct passwords keep appearing as incorrect
  26. Forgot password needs to redirect from wp-login to a custom page
  27. How can I change the email that is inside the default email texts of wordpress?
  28. How to password-protect everything except the logo
  29. Generate email on meta value update
  30. Why is wp-login trying to send an email?
  31. Is there anyway to get the inputted password string from the login form?
  32. Invalidate username if it contains @ symbol
  33. How can I password protect a WordPress site without requiring users to log in?
  34. Password not resetting on wordpress?
  35. autocomplete=”off” WordPress Login
  36. WordPress not logged in locally with correct username and password
  37. wordpress login without password just email address (NO 2 factor authentication with email)
  38. Sending new registration meta values to admin by email
  39. Can I protect a type of content site-wide with a single password?
  40. Password recovery URL has error – but not found in code or db
  41. Log in with email but no password
  42. Temporally disable password to login with empty password?
  43. I need to find which is the file that checks the DB for correct login (username, password)
  44. Updated : how to make email optional while user registration using default wordpress form
  45. Login form does not store/remember/suggest users password
  46. How to invalidate `password reset key` after being used
  47. WordPress password reset not working
  48. New user password confirmation sending wrong URL
  49. Locked out of WordPress admin area [closed]
  50. Global login to password protected pages
  51. Disable / Remove Password for Login WordPress
  52. WordPress does not send email confirmation to newly registered users
  53. How to password protect pages in WordPress
  54. confirmation email is send from my local host registration of a user but mail will not display in there email account?
  55. Chosen user password in registration is not being accepted on Login
  56. User login without username, only password
  57. wp_lostpassword_url not escaped
  58. Trouble logging in and/or changing password
  59. Cannot login with correct username and password anymore
  60. Log in a user upon password reset?
  61. Customize From and email address on password reset
  62. In Django, how do I know the currently logged-in user?
  63. Can I programmatically login a user without a password?
  64. Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
  65. Is there any way to rename or hide wp-login.php?
  66. How can I redirect user after entering wrong password?
  67. Increase of failed login attempts, brute force attacks? [closed]
  68. Login page ERROR: Cookies are blocked due to unexpected output
  69. Separate registration and login for different roles
  70. SSO / authentication integration with external ‘directory service’
  71. Preventing session timeout
  72. Disable user registration password email
  73. How reduce wordpress login session timeout time?
  74. How to prefill WordPress registration with social details
  75. Disallow user from editing their own profile information
  76. I can’t access my site via wp-admin
  77. ‘Password field is empty’ error when using autofill in Chrome
  78. Removing username from the ‘wordpress_logged_in’ cookie
  79. How to show ‘login error’ and ‘lost password’ on my template page?
  80. Missing URL in password reset email
  81. How do I require authorization / login to view a specific set of posts / pages?
  82. What is $interim_login?
  83. Custom login form
  84. How to prefill the username/password fields on the login page
  85. wp_signon returns user, but the user is not logged in
  86. How to protect pages with double authentication: password + email (in custom field)
  87. Adding extra authentication field in login page
  88. Replacing the WordPress password validation
  89. Prevent wp_login_form() from redirecting to wp-admin when there are errors
  90. Redirect user using the ‘wp_login_failed’ action hook if the error is ’empty_username’ or ’empty_password’
  91. wp_signon() does not authenticate user guidance needed
  92. What exactly is ReAuth?
  93. Login members using web services
  94. Make my wordpress blog remember my login “forever”
  95. How to check in timber if user is loggedin?
  96. How do I change the language of only the login page?
  97. Disable WordPress 3.6 idle logout / login modal window / session expiration
  98. Stop WordPress from logging me out (need to keep me logged in)
  99. Woocommerce registration page [closed]
  100. How to disable autocomplete on the wp-login.php page
Categories login Tags email, login, password
Fixed version number for cached stylesheets and javascript
allowing all HTML tags in tinymce editor

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress