E-Mail PreHeader

Hi Mauticians.

I was wondering if anyone has had any success in inserting a pre-header into a Blank Template email.
I know how to do this if I build the html myself, however finding it challenging to do manually.



Hi @mikew!
It would be nice in future releases if the Builder included an input specifically for the preheader text and automatically enclosed it in a span tag with “Display:none” (maybe that’s a feature that’s on the way in the future?), but it’s not too hard to do it manually in the blank template.

When you open the Builder for your email, in the first “slot” use the WYSIWIG editor on the right and just include your preheader text at the very beginning of the message. Then, click the “Code View” icon on the toolbar-- it’ll have this symbol: </>

All you have to do is wrap that preheader text in a tag and set the style so it doesn’t display:

You can switch back out of “Code View” by clicking the same icon again and editing the rest of your message normally.

Hope that helps!


Hey Scott,

thanks for the reply. I have tried this, however it still did not render the pre-header in gmail.

Actually it simply removed the code.
This is what I added:

Sent a mail, and saw it was not there, went and checked the code again and the builder had stripped the code.

I then went and added “Code Mode” and did the same, that seemed to work, some strange behaviour, but from my tests seems to be working.

Thanks for the direction!


Wow, that’s weird – I tried it in my mautic installation – created a test segment email, chose the blank template, added the preheader in code view, hit apply, closed the builder, saved & closed the email, then opened it back up and hit the “preview url” and looked at the code and the preheader was still there - not stripped, and opened the builder back up and verified it’s there in the code still.

I didn’t send the email as a test - but in general Gmail will strip certain html from email content, but I’ve not had a problem with that html for preheaders showing up in Gmail in the past.

Are you sure you hit “Apply” after adding the preheader text/html in the builder? If you close it without doing that, your changes may not have saved to the message. (Just a thought.)


1 Like

Oops, actually I see what you did wrong now, @mikew! You put the semi-colon for the style statement outside of the quotation marks. Refer to my screenshot in my original reply to see where it’s supposed to be. With inline CSS styles, the semi-colon should be at the end of each style declaration like so:


That’s probably why the builder stripped it out when you tested it! :slight_smile: