HTML in email templates

348 views
Skip to first unread message

TJ Keemon

unread,
Mar 4, 2015, 5:57:57 PM3/4/15
to edx-...@googlegroups.com
Hello-

Does anybody know if it's possible to put HTML in the email templates used for user registration, password resets, course enrollment, etc? I'm pretty sure these are most of the templates:

It looks like sending bulk emails supports HTML:

However, whenever I send an email under devstack, the content-type is set to text/plain. 

I'm a bit confused and I'm not sure where to go from here.

-TJ

Chris Dodge

unread,
Mar 5, 2015, 9:10:25 AM3/5/15
to edx-...@googlegroups.com
Hello TJ,

Thanks for your interest in Open edX.

Unfortunately, the codebase has inconsistent support for HTML emails. As you mention, bulk email is HTML, however most of the other workflow emails (e.g. activation, password reset, etc.) are plain text.

I'm not sure if this is on edX's near-term roadmap to address, but - if you have the ability to write Python/Django - it should be relatively straightforward to add this functionality yourself (and contribute it back :-) )

Best wishes,

Chris Dodge

TJ Keemon

unread,
Mar 5, 2015, 10:04:56 AM3/5/15
to edx-...@googlegroups.com
Hi Chris-

Thanks for the explanation. That was exactly the answer I was looking for. I'll definitely dig in a bit more and see about adding that functionality.

-TJ

Sarina Canelake

unread,
Mar 5, 2015, 10:26:39 AM3/5/15
to edx-code
Django 1.7 has multipart email by default. There is a PR that is long stalled to port the Django 1.7 sendmail functionality into our repo: https://github.com/edx/edx-platform/pull/6681

part of the issue is the UX/Marketing effort we need to do internally to make sure the templates look good. Also we want to figure out how to provide default templates for Open edX and use different ones for edx.org.

Felipe Montoya

unread,
Mar 6, 2015, 12:22:49 PM3/6/15
to edx-...@googlegroups.com
Hello TJ,


as Sarina said, there is a pull request I opened long ago to have that functionality merged in. At our instance, we have been doing html emails for something like a year already and it works very well. If you take a look at the PR and have any questions on how to use that or what you would require to change it, please let me know.

--
Felipe Montoya


On Wednesday, March 4, 2015 at 5:57:57 PM UTC-5, TJ Keemon wrote:

TJ Keemon

unread,
Mar 8, 2015, 8:00:50 PM3/8/15
to edx-...@googlegroups.com
Hi Felipe-

This looks great. Thanks for the link to your pull request. I'll take a closer look at it later this week.

-TJ

Daniel McQuillen

unread,
Mar 2, 2016, 11:08:28 PM3/2/16
to General Open edX discussion
Wondering what the status is of HTML templates for non-bulk email.

The PR mentioned in this thread was closed in favor of #6681 (https://github.com/edx/edx-platform/pull/6681) which was also closed with a note about Django 1.8 making the issue more easily resolved.

Is there now a standard way to create an html template for emails like registration, enrolment, etc.?

Thanks,

Daniel

Reply all
Reply to author
Forward
0 new messages