Skip Navigation

[Resolved] How to add HTML emails in CRED Form E-mail Notifications?

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by puneetS-3 4 years, 7 months ago.

Assisted by: Waqar.

Author
Posts
#1629475
Screenshot (31).png

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

#1629781

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

#1630559

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.

#1631081

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.

#1632323

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

#1632753

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.