Skip to:
Content

BuddyPress.org

Opened 3 months ago

Closed 3 months ago

#8108 closed enhancement (wontfix)

HTML emails with custom STMP plugin - BP core filter request

Reported by: philippebrousse Owned by:
Milestone: Priority: high
Severity: normal Version: 4.3.0
Component: Core Keywords:
Cc:

Description

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 ​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

Change History (2)

#1 @imath
3 months ago

Hi!

It looks like it's very relative to #8104 Possibly a duplicate ?

#2 @imath
3 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

It is a duplicate 😊 @philippebrousse I saw your confirmation about the fact the gist I’ve shared on the BuddyPress support forum topic was a working temporary fix.

I’m going to close this ticket: further progress about this need will happen on #8104

Thanks a lot for your feedbacks.

Note: See TracTickets for help on using tickets.