#6947 closed defect (bug) (fixed)
Emails error with "Could not instantiate mail function" from phpmailer.
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
Note: See
TracTickets for help on using
tickets.
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
andFromName
properties directly, whereas BuddyPress uses a method... which, by default, also setsSender
to theFrom
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