[buddypress-trac] [BuddyPress Trac] #8104: add filter in bp_send_email to allow html email in wp_mail call
buddypress-trac
noreply at wordpress.org
Mon Jun 17 04:51:56 UTC 2019
#8104: add filter in bp_send_email to allow html email in wp_mail call
-------------------------+-----------------------------
Reporter: shawfactor | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 4.3.0
Severity: normal | Keywords: needs-patch
-------------------------+-----------------------------
Currently when you need to use wp_mail in the bp_send_email function the
content sent is plain text. As far as I can see there is not way to
override this.
I understand why this is the default but this causes a problem if you have
downstream filters on wp_mail and expect or want the output to be in html
format. For instance in my case I have html queue class that logs all
emails and sends them asynchronously.
Unfortunately if I want to use this class the emails must be plain text,
which is not what I want as I have another downstream process that
actually makes all emails multipart anyway.
This problem could be fixed by simply adding a filter on bp-core-
functions.php line 3201 thus:
$email->get( apply_filters( 'bp_email_content_type', 'content_plaintext'
), 'replace-tokens' )
I really hope something like this could be added to the core plugin
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8104>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list