[Resolved] Adding style in the head tag of the emailer sent

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.

This topic contains 2 replies, has 2 voices.

Last updated by puneetS-3 1 month, 1 week ago.

Assigned support staff: Minesh.


I have been trying to send HTML emailer and I hit some isues. I was well guided by Waqar in this ticket : https://toolset.com/forums/topic/how-to-add-html-emails-in-cred-form-e-mail-notifications/

The reason I am creating this ticket is because, I am unable to push styles in my HTML emailer.

I was able to fix everything else with the help of waqar and some research of my own, but I need help in fixing the styles isssue.
According to my understanding the head of the emails is already sent by toolset when I add a new email notification and there is no way I can send the <style></style> in the header as I don't have access to it.
Due to this I am unable to make my code responsive on mobile device. My code works perfectly fine on large screen sizes but when it comes to mobile the email looks very small because there is no media query there. If i try to pass the style inside body, it gets stripped down.

Please help me add the styles inside the head so that my emailers can be responsive and my customers experience is good.

I am attaching screenshots of the mail on desktop and mobile for you to understand the situation better.



Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset Forms offer the hook cred_mail_header but in your case I do not think you can use it.
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_mail_header

The only way to add your custom style is you need to add the custom style to your email body area.

However - you are welcome to file a new feature request using the following link and our product manager will review the request:
=> https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/


Hey Minesh,

I was able to find the API that you mentioned and it won't help me push the style on the head.

The only way to add your custom style is you need to add the custom style to your email body area.

I don't think that this would work as most of the email client removes the style tag in between the body day.

I will do ahead and add a feature request for this, hope this gets added soon, as this really affects the user experience with the website.