
How to Change WordPress Default Email Sender Name
- March 14, 2016
- Leave a comment
Being a WordPress site owner it’s daily routine to receive notifications/alerts for emails, remarks, comments, updates or new user additions – all of which require your WordPress Email.
This email by default utilizes a generic sender Name i.e. “WordPress” as part of the “from name” bar. You can change this from name with your desired name using wp_mail_from_name filter.
This filter will modify the “from name“, that appears in any email sent, using the wp_mail function by adding the following code:
1 2 3 4 5 6 |
<?php add_filter( 'wp_mail_from_name', 'pt_wp_mail_from_name' ); function pt_wp_mail_from_name( $email_from ) { return ‘Your Name or Your Website Name’; } ?> |
To adjust the name you want (let’s say your site name), run the following command as well:
1 |
return get_option('blogname'); |
User Comments