Change the default sender on WordPress

By default, WordPress sends notification emails from WordPress <wordpress@yourdomain.tld>.

To change this to something nicer, just add few lines of code on your theme’s functions.php file:

add_filter(‘wp_mail_from’, ‘new_mail_from’);
add_filter(‘wp_mail_from_name’, ‘new_mail_from_name’);

function new_mail_from($old) {
return ‘info@yourdomain.tld’;
}
function new_mail_from_name($old) {
return ‘Yourdomain’;
}

Clearly, remember to change info@yourdomain.tld and Yourdomain.

 

Speak Your Mind

*