I have created a custom default registration email in the admin. When it goes out, EE seems to be adding a bunch of extra line breaks at the top of the email. I looked through the code and found the line where the email is sent. It is using wpautop() on the message body. This is fine, but I need to figure out where the line breaks are coming from. They are not there in the email editor in the admin so EE must be adding them somewhere during processing.
Yes, I removed the wpautop and that stopped the extra line breaks at the top of the email. That wasn’t a solution, however, because it also removed all of the line breaks from the content that were supposed to be there.
I also tried using trim() on the variable that is passed to wpautop(), but that didn’t help.
We do run the email through wpautop when it comes out of the db into the WP admin text editor, as well. So the solution for you may be to remove the wpautop from when it gets sent out (since it may produce unknown results), and pull your custom email into the editor, check the formatting that was done on it, and resave it. You could then even check it in the db, since that should then be exactly what will be going out.
Viewing 3 reply threads
The support post ‘Extra Line Breaks in Registration Email’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.