HTML emails

Issue #79 resolved
Seun D created an issue

Allow provision of a HTML email template to postman. The django core mailer already supports this.

I believe it would only a minor additions to the utilities. I'd be more than happy to work on this if it would be welcome.

Comments (7)

  1. Baptiste Darthenay

    I need it too.

    I guess the tricky part is to drop support of Django 1.6 and that the signature of django-mailer.send_mail is different:

    django.core.mail.send_mail

    def send_mail(subject, message, from_email, recipient_list,
                  fail_silently=False, auth_user=None, auth_password=None,
                  connection=None, html_message=None)
    

    django-mailer.send_mail:

    def send_mail(subject, message, from_email, recipient_list,
                  fail_silently=False, auth_user=None, auth_password=None,
                  priority=None)
    

    I'm ready to do a pull request, but I don't know what would be the right approch.

  2. Patrick Samson repo owner

    You may have a look at PR 11, related to this topic, but I don't think an additional setting is necessary.

    The forecasted design is: if there is a email_user.html template (same with email_visitor), the sending will have a text/html part, with a text/plain part from a email_user.txt template if existing, otherwise from strip_tags() of the html version. Without the html template, the behaviour is like before.

    This will be made compatible with django-mailer, and Django < 1.7.

  3. Patrick Samson repo owner

    Implementation committed. Look at the Notification page in the doc. Please evaluate it, you only need to replace utils.py, to confirm it is what you expected.

  4. Log in to comment