How to change activation email template?

Hi,

I am using Tutor 10.0.10.

I want to change the Activation Email template, I couldn’t find activation_email.txt file in ~/.local/share/tutor/data/openedx/staticfiles/templates/emails directory. I tried adding this file in custom theme but it didn’t work.

Is there any other way to do it ?

Thanks

Hello anshul798,

check this: https://discuss.openedx.org/t/how-to-change-edx-logo-and-sign-in-link-in-password-reset-email/172/3

https://github.com/edx/edx-platform/tree/open-release/juniper.1/common/templates/student/edx_ace/accountactivation/email

I hope it helps

I have looked further into this and found the following:

the templates for the accountactivation and the passwordreset emails both extend a base_body.html template (first line for them both):

{% extends 'ace_common/edx_ace/common/base_body.html' %}

If you create a base_body.html file in this path inside a custom theme it does override the template for the passwordrecovery email, however the activation one does not use it:

lms/templates/ace_common/edx_ace/common/base_body.html

There is only one base_body.html file in the ace_common app directory, and if you edit it, it does affect the activation email.

I am not familiar with django or jinja so I am not sure if it is a bug to be reported or we should add another file to the theme.

Recovery is part of “user_authn” within openedx/core/djangoapps whilst Activation is part of “common”. They have different folder structures.

I’m running into the same issue with Tutor 10.2.2 which uses Juniper.

I’ve followed the suggestion here Import from Opencraft + email template and have added the base_body.html to my custom theme directory lms/templates/ace_common/edx_ace/common/base_body.html.

However, as @juansele mentioned above, this fixes the password reset email, but not the account activation email. The account activation email is still sent with the outdated text and a header with links that go to a test url site.

In my attempts to fix the account activation email, I’ve tried the following to no avail:

  1. adding a common directory to my custom theme at common/templates/student/edx_ace/accountactivation/email/ to customize the body.html and body.txt files.

  2. tried adding the above files to lms/templates/student/edx_ace/accountactivation/email/

  3. tried adding the activation_email.txt file to lms/templates/emails.

There was mention in this post on StackOverflow about needing to purge the mako template directory; however, I can’t find it when I view the docker container using tutor local run lms bash.

Is there a way to edit the files in the docker container and then freeze those changes as an overlay layer? Alternatively, is it possible to access the actual dockerfiles that are used to create the images and modify the files there?

Thanks for any tips on where to look / what to do next.