Can we change WordPress default email settings for FromName and From address ?
Yes, it is very easy. Copy below code and paste it into functions.php
add_filter(
'wp_mail_from'
,
'wp_mail_from_func'
);
add_filter(
'wp_mail_from_name'
,
'wp_mail_from_name_func'
);
function
wp_mail_from_func
(
$old
) {
return
'your email address'
;
}
function
wp_mail_from_name_func
(
$old
) {
return
'your name or your website'
;
}
Leave a Reply