I am developing a site using Django and Python.
I am using django-mailer to send out a newsletter to registered subscribers. It can do text emails ok, but passing html into the send_mail function doesn’t have the desired result.
Is it possible to use django-mailer to send html or otherwise is there a way I can adjust/modify/hack it to do what I want?
Roam’s answer pointed me in the right direction, but it wasn’t a complete answer.
The real answer to this is that you can’t normally send html emails with django-mailer. It might be possible to hack django-mailer or work around it in someother way – but I haven’t yet heard of any way of doing that.
The better alternative is to use
send_html_emailbut this doesn’t actually come with django-mailer, although it does come with pinax-django-mailer which is a fork of django-mailer, so mostly the same but with the addition ofsend_html_email.If you have already installed django-mailer then you should make sure it is completely removed before attempting to install pinax-django-mailer otherwise you will encounter problems. I had to go into my Python directory and manually remove django-mailer in order to then get pinax-django-mailer installed cleanly.
Assuming that you have properly removed django-mailer (or not installed it in the first place) then you will find it quite easy to get up an running with pinax-django-mailer.