-1

At the admin dashboard of my wordpress under wordpress settings > general my admin email is set as info@mydomain.com

Here is my issue. When a customer wants to reset her or his password automated mail is sending from admin@www.mydomain.com instead of the admin email I setup at the settings > general

Basically I want to change from email address from admin@www.domain.com to info@mydomain.com for automated reset password emails

Thanks

  • Welcome to WordPress Stack Exchange! Sorry you got downvoted. But unfortunately stating just facts makes your question way too broad. Please update your question to include your previous attempts; to share a detailed and narrowly-scoped problem and where exactly you are stuck right now. Many thanks :) – leymannx Jun 23 at 10:39
0

As you can see here, WordPress will use WordPress as sender name and wordpress@<SITENAME> as sender email, if these params were note passed to wp_mail.

You can use wp_mail_from and wp_mail_from_name filters to modify these values though.

So if you want to change the sender e-mail address, just use this code:

add_filter( 'wp_mail_from', function( $email ) {
    return 'info@mydomain.com';
});

PS. But admin@www.mydomain.com is not a default email address that should be used, so maybe one of your plugins/theme is already changing that.

  • Thanks for the code. Didn't work though. Probably you are right about plugins/theme warning. I checked some plugins would have something to do with that but couldn't find anyting. I will continue to search though. Thanks for the tip. – Papalino Jun 23 at 10:56
  • @Papalino what have you done with that code? – Krzysiek Dróżdż Jun 23 at 11:00

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.