Changing WordPress Default “From” Email
add_filter(‘wp_mail_from’, function($email){ return str_replace(‘wordpress@’, ‘webmaster@’, $email ); }); add_filter(‘wp_mail_from_name’, function($name){ return $name === ‘WordPress’ ? get_bloginfo(‘name’) : $name; }); Here’s a version that uses the admin email set in in wordpress settings. This isn’t a great idea if the admin email isn’t a domain you own and can add the sending IP to the domain’s […]