Change WordPress Default Email Address

Here is a little tip which concerns the bloggers who use the WordPress CMS. By default, WordPress uses the email «  » and the name “WordPress” to send some notifications to users. This little piece of code will improve the wp_mail function of WordPress and let you personalize the sender email and name.

Just add this code into the functions.php file of your WordPress theme, and change and My Name values according to your needs.

[icon style=”chain” color=”red”]functions.php[/icon]

Don't miss business advice by email

No spam, just an email when new content is published.

[coded]
add_filter( 'wp_mail_from', 'my_mail_from' );
function my_mail_from($email)
{ return ''; }
add_filter( 'wp_mail_from_name', 'my_mail_from_name' );
function my_mail_from_name($name)
{ return 'My Name'; }
[/coded]

Leave a Reply

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

 

🕒 Quick and healthy meal? A perfect #keto bowl: a base of green vegetables, a protein (chicken, fish), a healthy fat (avocado, olive oil), oilseeds (chia, squash). Ready in 10 minutes. 👉 The complete guide to the ideal diet on http://blooness.com

💪 Keto ≠ 0 carbs.
Vegetables, berries and nuts are smart carbs that are compatible with a keto-Mediterranean diet. #KetoDiet
👉 Find the complete guide to the ideal diet on http://blooness.com

Load more

Don't miss business advice by email

No spam, just an email when new content is published.

en_USEN