Your theme styling is getting applied to your emails. If constant contact has a way the inline the styles that will help. Otherwise you are left with trying to clean up the HTML with your own custom add-on or look at http://postieplugin.com/downloads/style-fixer/
I don’t think the theme styling is the culprit here. Take a look at this page: https://www.cellarweb.com/plsbca/fwd-reminder-music-on-the-green-last-week-to-purchase-tickets/
All of those extra borders floating around in there…plus all of the footer/unsubscribe stuff.
All that is really wanted in the import is the stuff in the green box on that page.
Any way to strip things down? Or will I need to add my own function to strip out all inline styles and hook that into post-processing of the conversion?
Yes you will need to do something custom to find the right table or div that has the content you want.
Which hook is best to call if I want to strip out a specific div before the email is processed? postie_post_pre() or postie_post_before() ?
Just need to know the best place to strip out unwanted html content.
Thanks.
postie_post_before Is what you’re looking for.
I tested things with postie_post_before, but it appears that Postie is adding to the class name.
In the original mail, there is a
<div id=’Something’> ….
In the content after postie_post_before filter, that is changed to
<div id=’m-randomstringSomething’>…
I notice that other ‘ids’ are also changed to add that ‘m-randomstring’ text to the ID name. Is there a way to disable that?
Thanks.
That is not something Postie is doing. It must be one or your other plugins or something CC is doing.
Turns out the extra text in the ID was being inserted by Gmail when I forwarded the mail to postie for testing.
Thanks.
Thanks for letting me know how you solved it.