How to change WordPress default email ‘send from’ settings

By default, WordPress will send user registration emails from wordpress@your-domain.com. This is something most WordPress site owners want changed, and is actually pretty easy to do.

Simply paste the following code into your functionality plugin, or your theme’s functions.php file if you’re not using one, changing the information as needed to match your site.

add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
 
function new_mail_from($old) {
 return 'jing@christmaswebmaster.com';
 }
function new_mail_from_name($old) {
 return 'Christmas Webmaster';
 }

Leave a Reply

Your email address will not be published. Required fields are marked *