Giter Club home page Giter Club logo

Comments (12)

robinsonjohn avatar robinsonjohn commented on July 23, 2024 4

I have customized all three available email template files:

  • base.liquid
  • password-reset.liquid
  • user-invitation.liquid

After doing this, I have noticed the following:

Emails sent alongside in-app notifications do not use the base.liquid template. Also, there is no specific template available for this email.

Emails sent from @ mentions in a comment do use the base.liquid template, but there is no specific template available for this email either.

So, at a minimum, there are these two additional emails which need a template file to customize. In addition, the base.liquid template is being ignored in the in-app notification email.

Also, there currently seems to be no way to customize the email subject for any emails sent by Directus.

from directus.

robinsonjohn avatar robinsonjohn commented on July 23, 2024 1

From what I can tell, all email templates reside here, which at the moment include:

  • password-reset
  • user-invitation

At a minimum, Directus is sending out at least one other type of email, which is the email sent to notify a user of a new in-app notification.

Screenshot 2024-05-06 at 7 02 16 AM

from directus.

robinsonjohn avatar robinsonjohn commented on July 23, 2024 1

In addition, the documentation states that when a person is mentioned by typing the @ symbol, an email will be sent directing them to the comment.

from directus.

binaryben avatar binaryben commented on July 23, 2024 1

H/T @connorwinston for pointing out these types of emails just use the base.liquid file. Would mentions and emailed notifications be served well by a single new notification.liquid template which would probably be blank except for referencing base.liquid?

from directus.

Loosie94 avatar Loosie94 commented on July 23, 2024 1

I am facing the same problem.

It would be nice to be able to adjust the base.liquid template inside of Directus > Appearance.
At this moment there is hardcoded content inside this mail like: "Sent by the team at" which is not nice when your website is not English.

An extention for this could also do the job.

from directus.

pepeday avatar pepeday commented on July 23, 2024 1

You can craft new emails through flows with templates from the database, yes! This is purely in regards to overwriting the system emails, eg password-reset or user-invite

Ohh OK. Still useful to have but yeah my main usage for now is custom emails, not system generated ones. Thank you!

from directus.

robinsonjohn avatar robinsonjohn commented on July 23, 2024

Also, the base.liquid file makes reference to a footer block, but I don't see any reference to it in the documentation, and again, no .liquid template file available.

{% block footer %}{% endblock %}

from directus.

robinsonjohn avatar robinsonjohn commented on July 23, 2024

I just found another email sent by Directus which does not have a corresponding liquid template:

When a collection is exported to the file library, an in-app notification is sent to the user when the export is complete. If the user has email notifications turned on, an email is sent letting the user know that the export is ready.

This email should also have a customizable template.

Screenshot 2024-05-29 at 9 36 24 AM

from directus.

pepeday avatar pepeday commented on July 23, 2024

Is this applicable for Directus Cloud too? Or templates are not accessible there?

from directus.

rijkvanzanten avatar rijkvanzanten commented on July 23, 2024

@pepeday Templates can be overridden on the enterprise plan. Those projects run on dedicated hardware meaning that the end user can upload their own trusted files. I don't want to expose that on the self-service cloud tiers yet as the security risk is too great for the feature it unlocks. To René's point above, I like the direction of storing them in the database instead so they're properly user editable.

from directus.

pepeday avatar pepeday commented on July 23, 2024

@pepeday Templates can be overridden on the enterprise plan. Those projects run on dedicated hardware meaning that the end user can upload their own trusted files. I don't want to expose that on the self-service cloud tiers yet as the security risk is too great for the feature it unlocks. To René's point above, I like the direction of storing them in the database instead so they're properly user editable.

OK gotcha. From your response I understand that I could possibly use a record from a collection to craft an html email body?
I imagine I'd take a more traditional JS route?

from directus.

rijkvanzanten avatar rijkvanzanten commented on July 23, 2024

You can craft new emails through flows with templates from the database, yes! This is purely in regards to overwriting the system emails, eg password-reset or user-invite

from directus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.