I have created a Post form, and I am adding an HTML email as an email notification for the form.
I have an issue, the email body has a large white space from the top when I inspect I found there are some <p> and <br> tags that are automatically created.
I'm attaching a screenshot which should make it more clear.
I found a similar issue here: https://toolset.com/forums/topic/is-there-a-way-to-send-both-html-and-plain-text-email-as-multi-section-email/ but not able to found a solution.
So, I'm wondering Is there any way to get rid of these extra tags which are creating extra space to the mail body?
Thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
Toolset Form notifications don't support HTML emails out-of-the-box, so I'll need to see how this email notification is set up in your form.
Can you please share temporary admin login details along with a link to a page where this form can be seen?
I'll be in a better position to guide you around removing the extra tags, accordingly.
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
Thank you for sharing the admin access.
During some testing, I was able to remove the extra space from the top of the emails, using these steps:
1. I made all CSS styles included in your email notification's content inline, using the converter at:
hidden link
Inline CSS styles are considered a good practice when working with content for emails.
2. Next, I removed all the extra content/tags before the opening "body" tag and after the closing "body" tag, so that structure looks like this:
[wpv-noautop]
<body>
....
</body>
[/wpv-noautop]
You're welcome to test this in different email readers and utilities, as needed.
Hi Waqar,
Thank you for your help.
After following your suggested steps, I am able to remove the extra space but not completely. There are still some Extras <div>'s
on both top and bottom of the mail body.
Hi,
You can further trim down the extra divs/space from the top and bottom, by removing the wrapping body, center, and div tags and directly starting from the table tag.
( screenshot: hidden link )
However, please note that Google and/or any other email program can still add some wrapping divs for its own styling and layout before and after the email's content, which can't be avoided.
( screenshot: hidden link )
regards,
Waqar
Hi Waqar,
Yeah. Removing body, center, and div works.
However, please note that Google and/or any other email program can still add some wrapping divs for its own styling and layout before and after the email's content, which can't be avoided.
Yes, you are right there are still some <br> tags exist.
Thank you! for your help.