This project was so much fun to work on! The programming department approached our department to design our Total Touch POS system E-receipts. So any time someone who orders from a Total Touch POS system can get their receipt emailed to them. So tens of thousands of people will be receiving it.
This needed to be made on a single stylesheet containing HTML and CSS. It sounded straightforward. We got to it and before the day was over, came up with a few designs for them to choose from. They gave us our feedback and chose one of the designs. Great! We were astounded by how easy it was. Boy, were we in for a wake-up call.
A day later we get an email from the head of the programming department. It was of the E-receipt. It looked nothing like how we had designed it. None of the colors were right. Most of the content was missing. Everything was spaced weirdly. We had no idea what happened.
Challenges
So, it turns out that e-mail clients read code a little differently than web browsers. By “a little” we me “a whole lot”. And, to make it worse, we also found out that each email client reads code differently from other email clients! Most can’t even read a <div> tag, let alone CSS period. We needed to completely redo everything.
Time to Adapt
We had to do a whole lot of research and a bit of consulting. This took us multiple days because there was so much to learn.
- For the CSS, we knew some things we wrote worked. We kept what worked and threw out what didn’t. Any new styling we did had to be done with inline CSS.
- For HTML, we had to get rid of <div> tags. And for those of you who don’t know, that is what most HTML consists of. But, we learned that we could use tables. Tables in HTML are used to make exactly that. Tables. They have rows and columns and would be the lifeblood of this receipt template.
- We also had to consider how email clients changed the look of the template. Specifically, Gmail and Outlook. After what felt like an eternity of Googling. I found out that you can write conditional logic in HTML. This blew my mind. We could now write code specifically for Gmail, and code specifically for Outlook. They will still look a tiny bit different from each other (mainly because Outlook doesn’t like to read colors very well). But, it was absolutely good enough.
Testing
So when you are building an email template of this nature, it is paramount that you test it rigorously. Not only did we need to test it on every email client, but we need to test it on every email client on every type of phone. That sort of made it go from difficult to impossible rather quickly. There is no way that we can do that. We don’t have the time or resources for that.
That is until we found a program that would do just that. Email On Acid is a program that will allow you to test your template in over 200 different ways all at once. It saved the day. We were able to send out two more designs that we knew would work.
Conclusion
When you are building an email template, “compromise” is the name of the game. Flashy is nice but it is not the primary goal. In the end, we found a middle ground that we were all happy with. This was a HUGE learning experience for us, but also an absolute blast. I am so proud of my two coworkers, Jamie and Jacob. This was the first time the small team of us could collaborate on a single project together. Truly, this was an amazing experience.