Logo
Logo
Wordpress function

How to change the default WordPress email address

Have you ever noticed that on your WordPress website when you receive an email from your site it more than likely has from<[email protected]>?

This can be troublesome for some as most email clients will pick this up as spam and deposit it directly into the junk folder.

Simply add the below code into your functions.php file located under Appearance > Editor.

Feel free to make any changes you wish to the below

//Update default email
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');

function new_mail_from($old)
{
return '[email protected]'; //enter your new email addess here
}

function new_mail_from_name($old)
{
return 'Your Name here'; // enter your email from name here
}

tags:

Matt

Matt has been working in the web industry for over 15 years, he is also an avid mountain biker. He discovered his love for the internet years ago and has since honed his skills to keep up with the latest trends and technologies in the industry. Matt has worked with a diverse range of clients, including small businesses, non-profits, and large corporations, delivering high-quality websites. Apart from his work, Matt loves to explore the outdoors and takes every opportunity to hit the trails on his mountain bike. His commitment to his work and passion for mountain biking have earned him a reputation as a talented and well-rounded individual. If you're in need of a skilled web developer or an adventure-seeking mountain biker, Matt is the perfect fit.