Sometimes I need to create a HTML Email template. The customers sends me a Photoshop file, my task is to create a E-Mail template which can be used in Outlook to send E-Mails.
The customer also tells me to create multiple versions where for example the header is same but the content slightly different, eg. multi language content.
The problem with CSS.
You can’t simply embedd a CSS file (at least not in some email clients) so you need to use inline CSS for almost every HTML tag. For example for the “p” tag (paragraph). Then the customer says he wants the p tag a little bit bigger.. so you open all your HTML files and edit the inline CSS for all your P tags. Thats tedious and unproductive.
When you start a php script it will wait until it is done. Lately I and my customers were facing a huge problem where pictures were uploaded to a gallery web app and the problem was in the thumbnail generation.
The thumbnails were generated as someone opened the gallery (frontend). This resulted in long loading page and sometimes strange errors. Sometimes the page didnt load at all because Apache was working heavily on the thumbnails. Even worse was that the gallery was visited by many people simultaneously. The gallery app created 4 thumbnails out of one image in different sizes.
There are better ways to handle this. I could generate the thumbnails in the backend and show the thumbs on the frontend when they were generated. The problem is that I am using Owncloud as the backend and it is a pain the ass to extend Owncloud… but thats another story.
So, how did I manage to get rid of the problem and make the thumbnail generation fast and non blocking?
Currently I am creating a small console application for AceProject. (Github) I never worked with the Symfony CLI Component (CLI = Command Line Interface) but it works like a charm. You can create your own CLI applications in a breeze. And I already tried other php command line frameworks – most of the frameworks were complicated, complicated in the sense of understanding and creating simple CLI apps. Continue reading “How to add a Logo to Symfony Console Component”