HTML Emails - There must be a better way

Post Reply
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

HTML Emails - There must be a better way

Post by gabrielp »

Hi all,

I have a few HTML emails, all with similar templates, but are different in the content. I use the Mail send configurator pointing to these html files. As of now, I have 8 emails I'm contending with. I'm gearing up to launch a new flow that will have another 8 or so.



This works fine, but if I ever need to swap a logo or change some part of the template, I'd have to update and test 16 (or more) individual files.



What I would really like is for Switch to import a header/footer (template) and to place my content in between. This is classic templating and something I'm doing all day with web applications. In fact, if I could have Switch reach out to "gettemplate.php?id=proof_alert" and have that PHP run and return the HTML, I could easily build in a templating system to achieve what I'm looking for. Unfortunately, Switch needs straight HTML.



So has anyone else run into this issue? Can anything be done? I was also toying with the idea of some sort of HTML compiler that would regenerate .html files every time a template change was made. Then I could track those html files in git and do a git pull to update all of my flows instantly!



Not looking to recreate the wheel, so if anyone has any suggestions, would love to hear them.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
ArielRauch
Advanced member
Posts: 231
Joined: Thu Aug 07, 2014 10:04 am

HTML Emails - There must be a better way

Post by ArielRauch »

I think one option is definitely xslt.

You can prepare a xslt scheme with some option which can be chosen according to metadata fields.



I did this - as you know:)
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

HTML Emails - There must be a better way

Post by gabrielp »

ArielRauch wrote: I think one option is definitely xslt.

You can prepare a xslt scheme with some option which can be chosen according to metadata fields.



I did this - as you know:)
Ah yes. I'm going to look into this. I was able to find a clever way to generate HTML easily with a bit of PHP. I'm going to write up a quick guide on how I did it as I believe it's useful.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Post Reply