umputun / remark42

comment engine
https://remark42.com
MIT License
4.87k stars 377 forks source link

Support custom email templates #921

Closed ghost closed 3 years ago

ghost commented 3 years ago

It'd nice to be able to use own email templates or modify/redefine the existing email templates.

There's AUTH_EMAIL_TEMPLATE parameter which seems to serve the use case above, but only for a single template type(email_confirmation_login?), NOT for other templates:

umputun commented 3 years ago

There's AUTH_EMAIL_TEMPLATE parameter which seems to serve the use case above,

This is a deprecated parameter, you shouldn't use it

All email templates already exposed and provided as separate files in the produced docker container, see https://github.com/umputun/remark42/blob/master/Dockerfile#L72

It means you can map your custom templates right away by using docker-compose volumes. For example, to redefine email_confirmation_login.html.tmpl you just do

   volumes:
      - my_cool_conf_template.html:/srv/email_confirmation_login.html.tmpl

@akellbl4 - correct if this is wrong. As far as I recall this was yours

ghost commented 3 years ago

@umputun Many thanks for the blazingly fast reply! We'll try the mapping above, I guess we can close the issue then, thanks for the help!

akellbl4 commented 3 years ago

@umputun, should we put this tip in the docs?

paskal commented 3 years ago

Fell free to update that doc

denishonig commented 3 years ago

@umputun Please correct me if I am wrong, but it seems that in v.1.6.0 it is impossible to use email templates as separate files. Is it possible to make release with these changes? Thanks.

umputun commented 3 years ago

currently, you can get it from umputun/remark42:master image. As soon as 1.7 released it will be in

akellbl4 commented 3 years ago

@denishonig we released v1.7 and now you can customize the email template ;) I'm going to close the issue, feel free to reopen or start a new discussion in case you have questions.