5

I'm trying to customize the e-mail that you receive from WordPress when you reset your password. Right now it's a WordPress e-mail but I'd like to brand it with our company's logo and custom information (but of course keep the reset password link).

I've been digging around the wp-login.php page but haven't tracked down where that is controlled. I'm well-versed in the PHP mail function (which I'm assuming is called here) so I can edit it if I find the code. Does anyone know where that code is? Thanks!

8

WordPress uses custom wp_mail function, so you won't find it, if you'll search for mail.

Just take a look at line 248 of wp-login.php file: http://core.trac.wordpress.org/browser/branches/3.5/wp-login.php#L248

You should find retrieve_password_message filter call there. This is the filter that returns the content of reset password message.

You should also check the implementation of wp_mail function, because you will have to add headers to your mail (you want to send it as html and not as plain text, I guess). You can use wp_mail_content_type filter to change it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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