By default, WordPress uses the from name “WordPress” and address “wordpress@yourdomain.com”
when it sends notifications to users. It isn’t convenient and you might
want to change it into your Blog name or something like that. This
tutorial will show you how to do this just with some simple code.
Open the
Open the
functions.php
file of your theme and paste the following code into it:
- add_filter('wp_mail_from', 'new_mail_from');
- add_filter('wp_mail_from_name', 'new_mail_from_name');
- function new_mail_from($old) {
- return 'admin@yourdomain.com';
- }
- function new_mail_from_name($old) {
- return 'Your Blog Name';
- }
No comments:
Post a Comment