I am getting "Wordpress" when I sending my email using wp_mail. So to remove "Wordpress" from my e-mail I am using filter like so:

//Remove "Wordpress" when receiving email 
function remove_from_wordpress($email){
$wpfrom = get_option('blogname');
return $wpfrom;

add_filter('wp_mail_from_name', 'remove_from_wordpress');

It works great and now I am getting site name instead.

My question: Is this a proper way to do it? Because I am concerned that my filter will maybe break some other plugins. If that is the case how can I avoid that?
Thank you.

1 Answer 1


Yes, wp_mail_from_name filter is a correct way to change the "From" name in emails sent by WordPress. It should not cause any issues with other plugins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.