Quantcast
Channel: Extreme Web Designs » wordpress-snippets
Viewing all articles
Browse latest Browse all 10

WordPress Change default mail sender

$
0
0

Robert

When you install a new WordPress blog, WordPress stores the email address that you provide during the initial setup and uses it on all outgoing email notifications. To keep it professional, you can change it to a different email of your choice by using this snippet.

How to Change default mail sender in WordPress

In functions.php file of your WordPress theme, simply paste the following code and change the email and domain name to reflect your actual information:

function new_email_from()
{
return 'name@yourdomain.com';
}

function new_email_from_name()
{
return 'Your Domain name';
}

add_filter('wp_mail_from', 'new_email_from');
add_filter('wp_mail_from_name', 'new_email_from_name');

Your turn!

Do you know of any other way to change the default email address in WordPress? If yes, please feel free to share by commenting below.

WordPress Change default mail sender


Viewing all articles
Browse latest Browse all 10

Trending Articles