XAMPP: Debugging Email Messages
I use XAMPP to host my local pre-staging test environments and I don’t install the Mercury e-mail server since it doesn’t “play nice” with Outlook (or maybe it’s the other way around). That said, it’s always been a challenge to debug customizations I’m creating that include e-mail changes.
I was recently trolling through my c:/xampp folder and came across c:/xampp/mailoutput. This folder contains a bunch of
mail-*.txt files, one for every email group ever sent from one of my locally-hosted sites!
If a page’s action sent multiple email messages, those messages are concatenated within a single
mail-*.txt file. The beauty of this is that the HTML emails are captured as (er) HTML1 so that you can cut the HTML section out to a new file and display it in your web browser for validation.
Now, I can get rid of all the test-only changes that I’ve made to Zen Cart’s
zen_mail function and still debug/validate the email output that’s being generated.
1Unlike the method that Zen Cart uses to store the HTML emails in the database, replacing the HTML tags’ starting (<) and ending (>) characters with an underscore (_) which makes the stored information relatively useless as a means of determining how the message will be viewed.
Latest Blog [View All]
If I've helped you on the Zen Cart forums or you've found one of my free plugins helpful, feel free to give a little back by clicking here.