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 );
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?
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.
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
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
You can try use Stripo email builder. It's based on HTML and has integration with many apps.