[buddypress-trac] [BuddyPress Trac] #8108: HTML emails with custom STMP plugin - BP core filter request
buddypress-trac
noreply at wordpress.org
Sun Jun 30 19:30:42 UTC 2019
#8108: HTML emails with custom STMP plugin - BP core filter request
-----------------------------+-----------------------------
Reporter: philippebrousse | Owner: (none)
Type: enhancement | Status: new
Priority: high | Milestone: Awaiting Review
Component: Core | Version: 4.3.0
Severity: normal | Keywords:
-----------------------------+-----------------------------
Hi,
It seems that many developers, myself included, would need something like
this to enable the use of (custom) html templates whenever a custom SMTP
plugin is used.
I scanned through the support forum and noticed that many threads are
addressing this issue.
Some fixes have been provided in [https://buddypress.org/support/topic
/buddypress-email-notification-ignoring-smtp-server-settings/#post-306757
this thread] by the community, but involve editing the bp-core-
functions.php file.
In the thread is also proposed a filter that could be implemented in
function **bp_send_email** in file **/buddypress/bp-core/bp-core-
functions.php** to fix the issue.
Here a copy of @uscore713's proposal:
{{{
$must_use_wpmail = apply_filters( 'bp_email_use_wp_mail', $wp_html_emails
|| ! $is_default_wpmail );
if ( $must_use_wpmail ) {
$to = $email->get( 'to' );
$use_template = $wp_html_emails &&
return wp_mail(
array_shift( $to )->get_address(),
$email->get( 'subject', 'replace-tokens' ),
apply_filters( 'bp_email_force_use_of_templates',
false ) ?
$email->get_template( 'add-content' ) :
$email->get( 'content_plaintext',
'replace-tokens' )
);
}
}}}
Can you guys integrate this in the roadmap? it would be much appreciated.
Thanks,
Philippe
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8108>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list