Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Enable customization of subject line for password reset #10460

Closed
3 tasks done
eikaramba opened this issue Dec 12, 2021 · 5 comments
Closed
3 tasks done

Improvement: Enable customization of subject line for password reset #10460

eikaramba opened this issue Dec 12, 2021 · 5 comments

Comments

@eikaramba
Copy link
Contributor

Preflight Checklist

Describe the Bug

although the users service allows a custom subject line, the value is not set by the actual reset endpoint. i would argue to pass that variable along to support i18n. currently the subject line is always english.

see https://github.com/directus/directus/search?q=requestPasswordReset to understand the logic

To Reproduce

execute password reset

Errors Shown

No response

What version of Directus are you using?

9.2.2

What version of Node.js are you using?

16.6.1

What database are you using?

SQLITE

What browser are you using?

FF

What operating system are you using?

win64

How are you deploying Directus?

locally

@eikaramba
Copy link
Contributor Author

i mean this is quite easy to do. if approved, i can even pass a PR. but maybe you do not like to include the subject line into the endpoint, but instead want to make this configurable from the admin UI

@eikaramba
Copy link
Contributor Author

i also have some other ideas in regard to the email service.

  • add backend api url as a variable (currently only logo and color is there, but the actual backend url needs to be hardcoded). maybe one could even pass any abritrary environment variable.
  • if template has .mjml ending, e.g. mytemplate.mjml.liquid use mjml renderer before using liquid. i use this in other projects and it is an incredible advantage for every developer to just use mjml instead of html. it is easy to implement.

i really don't know how much time i should spent doing this if this is maybe not wanted. just leaving this here for now and if anyone says "go for it" then i will make my hands dirty :)

@rijkvanzanten
Copy link
Member

Heya!

I'd rather treat this as a single sprint to add I18N to all emails (including subjects) and notifications (as per #8239).

As for the MJML support; I hadn't heard of that before! Looks useful. That being said, I think we should choose between liquid or mjml based on the extension, rather than trying to do both. Is there any way to pass variables to an MJML template during render?

@rijkvanzanten
Copy link
Member

Lets keep the discussion around translations on the referenced discussion (#8239) and lets create a new discussion to add support for MJML 🙂

@azrikahar
Copy link
Contributor

For reference purpose, the aforementioned new discussion for MJML support can be found here: #10809

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants