Create Text & Online Versions of Emails Automatically
For this i’ve created django-firstclass. Firstclass is a proxy email backend for Django that allows for global email transformations such as automatically creating a plain text version of html emails or automatically creating an online version of the email that can be read in browser.
My goal was to have this be a drop in solution requiring no change to a code base. I also wanted this to be flexible enough so that it can work with a wide variety of projects. I accomplished this by adding a middleware pipeline to Django’s email process. I’ve bundled a few useful middleware in and plan to add a few more. Creating your own middleware is simple. Middleware is a single Python class that defines process_message.
For example if you wanted to create a middleware that would add a tracking pixel to all of your emails:
http://gist.github.com/3048960
You would then simply add TrackingPixelMiddleware to FIRSTCLASS_MIDDLEWARE.
2 Notes/ Hide
-
e-mechanism likes this
-
amccloud posted this
