As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #2176412
Wrapping HTML around Email Notification with wpbetteremails
Closed

Comments

  • Ramon Hein started the conversation

    Hi there,

    I'm trying to warp HTML around the plain text email notifications from amelia. I'm using wpbetteremails for the standard wordpress emails and the woocommerce emails and it works pretty well.

    I have tried to set Amelia to WP Email or PHP Email, but unfortunately it doesn't hook into it. It's just sends it plain text. To make WP Better Emails work with WooCommerce I've research some extra code. 

    // Selectively apply WPBE template if it's a WooCommerce email
    add_action( 'phpmailer_init', 'better_phpmailer_init', 20 );
    function better_phpmailer_init( $phpmailer ){
      // this filter will return true if the woocommerce_email_header action has run
      if ( apply_filters( 'better_wc_email', false ) ){
        global $wp_better_emails;
     
        // Add template to message
        $phpmailer->Body = $wp_better_emails->set_email_template( $phpmailer->Body );
     
        // Replace variables in email
        $phpmailer->Body = apply_filters( 'wpbe_html_body', $wp_better_emails->template_vars_replacement( $phpmailer->Body ) );
      }

    Any hint how this can be solved with Amelia?

    Furthermore it always adds a lot of space between each lines, if I type a line break. Please have a look at the attachments. Shift and Enter doesn't change anything. How can I make a line break without the extra space?

    All the best
    Ramon

  •  2,576
    Aleksandar replied

    Hello Ramon

    I'm not sure how wpbetteremails works, since I've never used it, but I do know that simply adding HTML in the e-mail will not work.

    You can take a look at ../wp-content/plugins/ameliabooking/src/Infrastructure/Services/Notification/ and there you will see PHPMailService.php and WpMailService.php. Maybe you can modify those files and get it to work.

    As for the extra lines, unfortunately this is a bug on our end, and our developers are working on fixing that for one of our future releases. We don't have a workaround for this, unfortunately.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Zene replied

    You can try use Stripo email builder. It's based on HTML and has integration with many apps.