Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#37787 closed defect (bug) (invalid)

WordPress MU 4.5.3 password reset mail doet not work. Other mail does.

Reported by: bjornw's profile BjornW Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.3
Component: Mail Keywords: reporter-feedback
Focuses: Cc:

Description

I'm using a 4.5.3 WordPress MU installation.

Using the password forgotten functionality on the wp-login.php page I get the following error message:

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

The weird thing is, if I add a new user it will send this email without any issues at all.

I've removed all plugins from the plugins folder, and all themes except for Twentysixteen, after that I've checked the following:

  • Made sure mail works by logging (via ssh) into the server an sending an email with sendmail commmand line application. Mail was sent and received without any issues.
  • Sent mail using a PHP script using mail() on the commandline with php -f. Mail is send & received, works as expected.
  • Made a tiny plugin, hooks into init and sends email with PHP's mail(). Mail is sent & received, works as expected.
  • Changed the tiny plugin to use WordPress' wp_mail() function. This fails silently, even when hooking into wp_mail_failed.

Configuration:

  • WordPress Mu 4.5.3
  • Nginx with php5-fpm
  • Server uses sSMTP connecting to another mail server.

Conclusion
So far it seems that something is making wp_mail() fail silently when calling it directly from a plugin or when using it for a password reset while sending out an email to a new uses works.

Any tips on debugging is much appreciated!

Change History (9)

#1 follow-up: @stephenharris
8 years ago

It sounds like this could be related to #37736

#2 in reply to: ↑ 1 ; follow-up: @BjornW
8 years ago

Replying to stephenharris:

It sounds like this could be related to #37736

Except my issue is found in version 4.5.3

#3 in reply to: ↑ 2 @stephenharris
8 years ago

Except my issue is found in version 4.5.3

You're right, my apologies @BjornW, miss-read the version. Just to confirm the wp_mail_failed hook doesn't fire?

If so then Phpmailer is just returning false: https://github.com/WordPress/WordPress/blob/4.5.3/wp-includes/class-phpmailer.php#L1113-L1134

I'd recommend adding some error logs there, first to see if is failing on preSend or postSend.

#4 follow-up: @peterwsterling
8 years ago

  • Focuses multisite removed

This is an issue I am finding on WP 4.6 too. Any progress? Can I help? Happy to take direction or provide data/examples/etc...

#5 in reply to: ↑ 4 @BjornW
8 years ago

Replying to peterwsterling:

This is an issue I am finding on WP 4.6 too. Any progress? Can I help? Happy to take direction or provide data/examples/etc...

Hi @peterwsterling is the problem happening to you on Multisite as well?

#6 @peterwsterling
8 years ago

@BjornW the issue I was seeing appears to be fixed by this patch:
https://core.trac.wordpress.org/ticket/37736

#7 @desrosj
5 years ago

  • Keywords close reporter-feedback added

@BjornW sorry that this ticket fell dormant.

Are you still able to reproduce this issue? Did the fix for #37736 (which shipped in WordPress 4.6.1) also fix your issue?

#8 @BjornW
5 years ago

@desrosj I will re-check asap and report back here with the results.

#9 @desrosj
5 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

I'm going to close this out since there has not been an update and this should have been fixed in #37736.

If someone can reproduce this, it can be revisited.

Note: See TracTickets for help on using tickets.