After a new user registration, WP sends out an email with the login / password, and a link to the login page.
Is there a way to change this defaut email template? I’d also like to change the subject and sender.
Edit : For anyone interested, here is a plugin solution.
The new user email is sent using the
wp_new_user_notification()
function. This function is pluggable, which means that you can overwrite it:Note: Overriding pluggable functions cannot be done in the theme functions.php file. WP’s pluggable file is already loaded by that point so the function would be defined by WP (i.e. the default). Your custom version must load before this happens, which means you must load it in a custom plugin file.
For 2018 and onwards users:
Since WordPress 4.9.0 there are new filters you can use for this (no need for a plugin anymore):
Usage example on email sent to Admin (you can paste this in your theme’s functions.php ):
This will not work on functions.php. You need to put this code inside a plugin.
If you don’t now to make a plugin for this just use this link.
Don’t forget to take the update code of this function form here.