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

*

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close