WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 8 months ago

#39110 new enhancement

Better error handling when email cannot be sent during password reset

Reported by: johnbillion Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Mail Keywords: ux-feedback has-patch
Focuses: Cc:

Description

If an email cannot be sent during a password reset (due to server misconfiguration etc), this is potentially a blocker for the user. Currently the user is presented with the message:

The email could not be sent. Possible reason: your host may have disabled the mail() function.

This is a dead end and there's no suggested next action for the user. There's a good chance that this is the first time the user has been made aware that their server is unable to send emails.

A few things could be done to make this situation less painful, or avoid arriving at this situation in the first place.

  1. During installation, if the New WordPress Site email fails to send then a flag should be set which triggers a dismissable notification in the admin area stating that outgoing emails don't appear to be working, with a link to some documentation on the subject.
  2. During password reset, the The email could not be sent error message should be presented in a nicer format (possibly returning a WP_Error from retrieve_password() instead of triggering a wp_die()) and should have some more helpful information, including a link to external documentation.

Attachments (1)

39110.patch (1.3 KB) - added by neelpatel7295 8 months ago.
Patch related to display error message instead of die

Download all attachments as: .zip

Change History (4)

#1 @neelpatel7295
8 months ago

  • Keywords has-patch added; needs-patch removed

I have done the half of job, added a patch related not die the . instead of I have done the half of the work. I have added a patch related it will not die when displaying the message like "The email could not be sent". Instead of it will stay on same page and displaying the error message.

@neelpatel7295
8 months ago

Patch related to display error message instead of die

#2 follow-up: @johnbillion
8 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Summary changed from Better error handling when emails cannot be sent (specifically during password reset) to Better error handling when email cannot be sent during password reset

I like this change, @neelpatel7295.

#3 in reply to: ↑ 2 @neelpatel7295
8 months ago

Replying to johnbillion:

I like this change, @neelpatel7295.

Thanks for your appreciation, actually i didn't found any documentation link which relevant to how to solve such problem. Also currently focusing on the first point and definitely provide related solution soon.

Note: See TracTickets for help on using tickets.