Okay
  Public Ticket #3665213
News Notification Email doesn't work
Closed

Comments

  • Esteban started the conversation

    Hi!

    When I go to: LMS > Settings > Touch Points > Activate: News (Student Notification and Email) and click on "Edit Email Template", I am redirected to the 'BuddyPress Email' page, but it is empty (it shows the message: "No emails found").

    If I try to 'Add New', there is no option in the "Situation" panel to trigger when the instructor posts a news update.

    I have already used the option: 'Tools > BuddyPress > Repair > Reinstall emails (delete and restore from defaults)', but it still doesn't work.

  • Esteban replied

    Hi! I successfully migrated the emails. However, I now have another issue: the email is sent, but the HTML tags are not rendered; they are visible as part of the content (please see the attachment).

    Attached files:  Email - HTML not Rendered.png

  • [deleted] replied

    How to add code in wplms customizer plugin

    add this code in your wplms-customizer.php file in wplms customizer plugin : 

    // Set BP to use wp_mail
    add_filter( 'bp_email_use_wp_mail', '__return_true' );
    // Set messages to HTML for BP sent emails.
    add_filter( 'wp_mail_content_type', function( $default ) {
    	if ( did_action( 'bp_send_email' ) ) {
    		return 'text/html';
    	}
    	return $default;
    } );
    // Use HTML template
    add_filter(
    	'bp_email_get_content_plaintext',
    	function( $content, $property, $transform, $bp_email ) {
    		if ( ! did_action( 'bp_send_email' ) ) {
    			return $content;
    		}
    		return $bp_email->get_template( 'add-content' );
    	},
    	10,
    	4
    );