LPgenerator / django-db-mailer

Django module to easily send emails/sms/tts/push using django templates stored on database and managed through the Django Admin
https://github.com/LPgenerator/django-db-mailer
GNU General Public License v2.0
256 stars 80 forks source link

Different text and html message #41

Closed katomaso closed 8 years ago

katomaso commented 8 years ago

Hi, it would be very nice to have the possibility to define textual and HTML message separately. You are using the function dbmail.utils.clean_html to strip out the HTML tags but this is insufficient in case you want a rich and nice HTML with images and stuff but your textual message would look weird if those images were removed.

I think that adding another field body next to the HTML message would do the job.

gotlium commented 8 years ago

Hi, possible we can change dbmail.utils.clean_html functionality. Can you show examples with images result. If we add a text body field, then we need to clean text from html to text using js on admin.

gotlium commented 8 years ago

@vosi what you think about this idea?

katomaso commented 8 years ago

Hi, I was thinking about offering the possibility to fully customize non-html message. But when I think about it again then not many people would use it. I saw it on myself when I imagined I should rewrite all my email templates.