How to change the default WordPress sender name and email address

To change the default sender name and email address, simply paste this code snippet into your (child-)theme’s functions.php.