html+text email support?

4 views
Skip to first unread message

Ian Struble

unread,
Sep 30, 2008, 9:32:34 PM9/30/08
to django-mailer
This ticket, http://code.google.com/p/django-mailer/issues/detail?id=9,
brought up supporting EmailMessage and a user defined content_type for
a message. I read that and thought "Oh cool, support for html
emails." If you are sending html emails, it is probably a good idea
to send a text+html multipart/alternative message, right? So how
about just adding support for text+html messages to go along with the
existing plain text messages?

I recognize that adding full support for multipart messages is
probably way more work than anyone is ready to spend right now. Full
multipart message support is also overkill since the combination of
plain text and simple text+html messages covers the majority of emails
sent today. It would not be pretty but as a super simple solution,
you could add a column like message_body_html and then key off it to
determine if you are sending test or html+text.

Thoughts? Heckles? Polite pats on the head?

Ian

James Tauber

unread,
Oct 1, 2008, 4:51:37 AM10/1/08
to django...@googlegroups.com

On Sep 30, 2008, at 9:32 PM, Ian Struble wrote:
> This ticket, http://code.google.com/p/django-mailer/issues/detail?
> id=9,

I'm all for adding support for html+text email in django-mailer but
I'm not likely to get to it any time soon myself.

Patches accepted :-)

James

Ian Struble

unread,
Oct 2, 2008, 8:30:38 PM10/2/08
to django...@googlegroups.com
I have a patch that adds very simple text+html support but I do not have any tests beyond fixture with two test messages in it.  Is it correct that there are no tests for the project at this time?

Also, can anyone point me towards a way to generate a svn style patch using git or would a git-format-patch style patch be ok?

Thanks,
Ian

James Tauber

unread,
Oct 2, 2008, 8:49:36 PM10/2/08
to django...@googlegroups.com
There are no automated tests for django-mailer at this time.

Regarding diff format, git-format-patch is fine -- I need to learn to
deal with it some time :-)

James

Ian Struble

unread,
May 24, 2009, 2:18:53 PM5/24/09
to django...@googlegroups.com
I found myself messing around with pinax again this week and decided
to resubmit the simple text+html support that I hashed out back in
October.  This time I managed to add a few very simple tests.  It is
committed on github:

http://github.com/istruble/django-mailer/commit/6bb3601fcbc225aad5a7c694ad88996eb91b6013

I actually addressed issues #2 and #4 on github.  They started in two
separate branches but unfortunately I merged one back into the other
before I added tests today.  The tests are very basic but do exercise
the text+html stuff. People can add more tests when they touch an
untested piece of the code. Are their any suggestions for better ways
to go about adding tests to this project or is this a good start?

http://github.com/jtauber/django-mailer/issues#issue/2
http://github.com/jtauber/django-mailer/issues#issue/4

I am not sure if there is a feature freeze in place right now as I
gather their is for pinax.  Neither issue is critical. Issue #2, use
single SMTP connection for sending e-mails, might not be considered a
feature change. If there is a feature freeze in place, it can still
be considered for 0.1.0.

The way I addressed issue #4 is nearly identical to the way that
FlashingPumpkin addressed it but we are both adding the text+html
functionality.  It should not be considered for 0.1.0 if there is a
feature freeze in place.

Ian
Reply all
Reply to author
Forward
0 new messages