BradWhittington/django-templated-email — pull request #35 by phpdude (2014-03-08 10:45:54+00:00)
Title: Support for TEMPLATED_EMAIL_PLAIN_FILTER

Added support for TEMPLATED_EMAIL_PLAIN_FILTER.

If template have not plain text part, this part can be automatically generated from HTML version via custom filter function defined in settings.

For example setting.

TEMPLATED_EMAIL_PLAIN_FILTER = 'project.portal.email.plainfilter'

and custom filter

def plainfilter(html):
encoder = HTML2Text()

return encoder.handle(html)

User will get email with html and plain text message markdown formatted.

You free to use your filter function implementation and define it in settings.