Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6947 closed defect (bug) (fixed)

Emails error with "Could not instantiate mail function" from phpmailer.

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile djpaul
Milestone: 2.5.1 Priority: normal
Severity: normal Version:
Component: Emails Keywords:
Cc:

Description

Some cases of email issue seem related to the above error coming from phpmailer, which can occur if PHP's mail() call fails. As we can prove wp_mail() is working in situations where bp_send_email() isn't, we know these aren't a system-level problem.

Change History (3)

#1 @DJPaul
9 years ago

Extensive testing and experiment with @shanebp has revealed a fun quirk with PHPMailer. My current thoughts is that our PHPMailer implementation needs to match WordPress', so if anyone has had to configure server configuration to get wp_mail() to work, BudyPress' should just work.

The only significant difference is that we set the Sender property, and WordPress doesn't.

This was somewhat of an oversight because WordPress sets an email's From and FromName properties directly, whereas BuddyPress uses a method... which, by default, also sets Sender to the From address.

From the following WP trac tickets (just the cream of the crop), there are calls for all these settings to be set one way or another, and setting Sender was tried and reverted years ago because it broke more than it helped:

https://core.trac.wordpress.org/ticket/18792
https://core.trac.wordpress.org/ticket/5007
https://core.trac.wordpress.org/ticket/5294
https://core.trac.wordpress.org/ticket/5869
https://core.trac.wordpress.org/ticket/25651

#2 @djpaul
9 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 10639:

Emails: when configuring PHPMailer, don't set Sender property.

This change matches our implementation to be more similar to WordPress'.
Testing has proven this change to fix email deliverability for, at least, certain major web hosts.

Fixes #6947

#3 @djpaul
9 years ago

In 10640:

Emails: when configuring PHPMailer, don't set Sender property.

This change matches our implementation to be more similar to WordPress'.
Testing has proven this change to fix email deliverability for, at least, certain major web hosts.

Fixes #6947 (branch 2.5)

Note: See TracTickets for help on using tickets.