Change default sender name and email of WordPress notifications

Published on Jun 13, 2015 & tagged in WordPress

In default, WordPress use WordPress@your_website.com as the sender email and WordPress as sender name for all email notifications like forget password, new registrations etc. But in customized WordPress installations, I like to use custom name and email address for all notifications from my application.

So instead of using plugins, I’m going to use a simple code snippet for this WordPress tweaks. So here is a small code snippet to change sender email address and sender name of WordPress notifications.

add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
 
function new_mail_from() {
	return 'yourname@yourdomain.com';
}
function new_mail_from_name() {
	return 'Your Name';
}

We want to add above code snippet in our theme’s functions.php file and then change the details. That’s done.

Do you need any help on WordPress?

I'm happy to help you. Just fill the form on contact page & I will get back to you within few hours.

Recent Posts

  1. The add_image_size() function - WordPress best practices
  2. Remove page title using filter - WordPress
  3. Comment out code in Liquid Template Language
  4. Remove Plugin Stylesheets and Scripts - WordPress
  5. Get blog page URL - WordPress