Title: problem send emails
Last modified: November 21, 2023

---

# problem send emails

 *  Resolved [germanoalves](https://wordpress.org/support/users/germanoalves/)
 * (@germanoalves)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/)
 * I’m having trouble sending the message by email during the password recovery 
   process. I have already installed an SMTP plugin, tested it by sending an email,
   and the plugin is working perfectly, but the password plugin message is not. 
   I already added the code below to ‘functions.php’ and it didn’t work either.
 * function whitelist_auth_endpoints( $endpoints ) {
   $endpoints[] = ‘[https://mysite.com/sys/wp-json/bdpwr/v1/reset-password&#8217](https://mysite.com/sys/wp-json/bdpwr/v1/reset-password&#8217);;
   $endpoints[] = ”[https://mysite.com/sys/wp-json/bdpwr/v1/set-password&#8217](https://mysite.com/sys/wp-json/bdpwr/v1/set-password&#8217);;
   $endpoints[] = ”[https://mysite.com/sys/wp-json/bdpwr/v1/validate-code&#8217](https://mysite.com/sys/wp-json/bdpwr/v1/validate-code&#8217);;
   return $endpoints;};
 * add_filter( ‘jwt_auth_whitelist’ , ‘whitelist_auth_endpoints’ , 10 , 1 );

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17220932)
 * Hello,
 * Thanks for reporting your issue.
 * As a quick side note – adding the routes to the whitelist on the `jwt_auth_whitelist`
   is only necessary if you’re also using the jwt-auth plugin, it should have no
   impact on emails being sent.
 * When you say the plugin is not working, and you’re not getting the email, can
   you please be more specific about what _is_ happening? i.e. when you send a request
   to `/wp-json/bdpwr/v1/reset-password` are you getting a success response or an
   error?
 * Another side note on using the SMTP plugins, I’m not sure how you tested this,
   but I have found in the past that using the _Send Test Email_ type function with
   the likes of Easy WP SMTP that it’s not a good test of emails from WP more generally,
   and I’d suggest attempting to send a password reset request from the main `/wp-
   login.php` screen to check that you receive the email. It’d be a better test 
   of whether emails coming through `wp_mail` are being delivered OK.
 * If you’re getting success responses from the `reset-password` route, I’d also
   suggest using a plugin like WP Mail Logging to check if WP is sending the email,
   if the email appears in the log here, it would mean that the plugin is sending
   it OK and the problem lies elsewhere.
 *  Thread Starter [germanoalves](https://wordpress.org/support/users/germanoalves/)
 * (@germanoalves)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17222240)
 * the behavior is strange. I installed the “WP MailCatcher” plugin to monitor email
   sends and sending it manually within the WP dashboard works. But when testing
   my code in reactj, the request status ‘200’ appears in the browser but the email
   does not arrive nor is it registered in the ‘wp mail catcher’ plugin”
 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17224859)
 * OK, yes it is strange, I’m not sure what I can suggest other some deeper debugging
   of the site. There’s the usual – trying with all other plugins deactivated to
   ensure it’s not conflicting with anything. But aside from that by temporarily
   dumping some info out for example updating the `api.route.reset-password.php`
   file from line 33, which currently says:
 * `$user->send_reset_code();`
 * And update to:
 *     ```wp-block-code
       $sent = $user->send_reset_code();
       var_dump( $sent );
       die()
       ```
   
 * If you then sent the request from Postman or something you’d see if the code 
   at least _thinks_ that it’s sending the email.
 *  Thread Starter [germanoalves](https://wordpress.org/support/users/germanoalves/)
 * (@germanoalves)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17225200)
 * Hello! Thank you for your help! The plugin is amazing and the support is incredible!
   I uninstalled and reinstalled the plugin again and it worked! Thanks!
 *  Thread Starter [germanoalves](https://wordpress.org/support/users/germanoalves/)
 * (@germanoalves)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17225202)
 * ^^
 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17225206)
 * As per my other message, glad it’s working now!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘problem send emails’ is closed to new replies.

 * ![](https://ps.w.org/bdvs-password-reset/assets/icon-128x128.jpg?rev=2301474)
 * [Password Reset with Code for WordPress REST API](https://wordpress.org/plugins/bdvs-password-reset/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bdvs-password-reset/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bdvs-password-reset/)
 * [Active Topics](https://wordpress.org/support/plugin/bdvs-password-reset/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bdvs-password-reset/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bdvs-password-reset/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/problem-send-emails/#post-17225206)
 * Status: resolved