Support

Home Forums Event Espresso Premium white space in registration mail

white space in registration mail

Posted: April 22, 2018 at 8:28 am


cyrop

April 22, 2018 at 8:28 am

Hello,
Hope you can help me with this.
I get a big white space at the start of the registration email that you can see here:

And the code injected that’s causing the problem:

The customization of the email template wouldn’t be causing the issue as all other notification or email from the site are displaying ok and have correct html.

thanks!


cyrop

April 22, 2018 at 8:32 am

Image links corrected…

white space:
http://www.workandfun.com.uy/wp-content/uploads/2018/04/gap.jpg

Code:
http://www.workandfun.com.uy/wp-content/uploads/2018/04/code.jpg


Tony

  • Support Staff

April 23, 2018 at 4:07 am

Hi there,

The customization of the email template wouldn’t be causing the issue as all other notification or email from the site are displaying ok and have correct html.

I’m not sure I follow this? You have a custom template that is showing additional padding, but it can’t be the customizations made to that template because other emails are working?

Each template can be individually customized, so it could be the customizations to that template, have you checked the text view of the template in question to check for additional br tags?


cyrop

April 23, 2018 at 5:35 am

Hi Tony,
Just in case it may help other users:
I have WP HTML Mail installed for customizing all emails sent from my site.
This was causing the problem setting an wp autop in confirmation emails.
Commenting line 313 in class-haet-mail.php fixed the issue.

Thanks,
Cyro


cyrop

April 23, 2018 at 7:02 am

Forgot to add:
// Comment line 313
// $email[‘message’] = wpautop($email[‘message’]);
// Add filter to keep <br> working:
add_filter( ‘message’, ‘nl2br’ );


Tony

  • Support Staff

April 23, 2018 at 7:23 am

Editing core files of a plugin isn’t really a good solution as you’ll break anything else that relies on that function and you’ll lose that customization if/when you update the plugin.

// Comment line 313
// $email[‘message’] = wpautop($email[‘message’]);
// Add filter to keep <br> working:
add_filter( ‘message’, ‘nl2br’ );

That doesn’t look correct to me, add_filter( ‘message’, ‘nl2br’ ); adds ‘nl2br’ as a callback to a filter hook called ‘message’, which as far as I can tell, doesn’t exist so the above does nothing?

I think you meant: $email['message'] = nl2br($email['message']);

You’ll likely find that causes more problems, but either way, I think this is the wrong approach.

EE already includes full HTML emails, this plugin is then wrapping all of the EE content in another template and adding the EE content again, which may be expected if you edited all of the EE templates?


cyrop

April 23, 2018 at 7:44 am

I needed EE mails and WP to look all the same.
Not being a developer and on a really tight deadline this was a quick fix.
I’ll try to improve the solution for next version.
Thanks for your feedback.

The support post ‘white space in registration mail’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso