Skip to content

Customize content and looks of email templates #729

Closed

Description

@saibotma

🚀 Feature

As an admin I want to be able to customize the content and looks of email templates dynamically in the admin interface.

Have you spent some time to check if this issue has been raised before?

yes

Have you read the Code of Conduct?

yes

Pitch

Emails can be branded with the company design.

Activity

  1. TorstenDittmann commented on Nov 4, 2020

    @TorstenDittmann
    Contributor

    I already set up a good foundation for this issue on the template side here.

    Files that can be customized for this:
    https://github.com/appwrite/appwrite/blob/master/app/config/locales/templates/_cta.tpl
    https://github.com/appwrite/appwrite/blob/master/app/config/locales/templates/_base.tpl

    Also there are some things in place already for some kind of customization like

    ->setParam('{{bg-body}}', '#f6f6f6')
    ->setParam('{{bg-content}}', '#ffffff')
    ->setParam('{{bg-cta}}', '#3498db')
    ->setParam('{{bg-cta-hover}}', '#34495e')
    ->setParam('{{text-content}}', '#000000')
    ->setParam('{{text-cta}}', '#ffffff')
    

    Things left to add for this:

    • Pages in the dashboard
    • A way to save custom HTML/colors in the database
    • Use a custom template for the mails if set

    I doubt we need any endpoints.

    Do we want to add only color branding or complete HTML customization?

  2. eldadfux commented on Nov 4, 2020

    @eldadfux
    Member

    Umm.. maybe we can add the colors as project settings (alongside the project logo), which will be consumed from the default template and also add an option to completely overwrite the templates HTML code and contents?

    We also need to think about multi-locale content, should we allow content overwriting for each locale separately?

  3. TorstenDittmann commented on Nov 4, 2020

    @TorstenDittmann
    Contributor

    Umm.. maybe we can add the colors as project settings (alongside the project logo), which will be consumed from the default template and also add an option to completely overwrite the templates HTML code and contents?

    Had the same thought. Maybe we also add a {logo} variable. CSS in these templates is a pain - so I doubt it is a good idea for many people. Would still love to have it.

    We also need to think about multi-locale content, should we allow content overwriting for each locale separately?

    Mhh, I only thought of global changes. Also can't think of a use case for this 🤔

  4. eldadfux commented on Nov 4, 2020

    @eldadfux
    Member

    Mhh, I only thought of global changes. Also can't think of a use case for this 🤔

    For example, if an app wants to support 3 main languages, and the developer wants to have customised email messages. Writing the down makes me think this might be a rare edge case or at least too early to think about.

  5. added
    backlog
    enhancement
    on Nov 4, 2020
  6. saibotma commented on Nov 12, 2020

    @saibotma
    Author

    @TorstenDittmann the optimal solution would be if the user could just upload a template created with the templating language appwrite uses. This way appwrite would not need to have any editor for the templates.

    But being able to change colors, font and content would be enough for the beginning I believe.

  7. TorstenDittmann commented on Nov 12, 2020

    @TorstenDittmann
    Contributor

    That means we would need to overthink, on how we store translations for these mails. Or translations in general.

    I would also love to introduce something like MJML, which would bring the e-mails send by Appwrite to the next level. This would also make custom e-mail templates very accessible - since in todays world we have to use some sketchy CSS attributes and tables in HTML to make emails look good.

    MJML would introduce a well documented templating syntax and we just provide the placeholders for the content.

    @eldadfux there is the scary part, we would introduce a dependency, but that doesnt mean that MJML is mandatory for the user. Since you could just use custom HTML/CSS - run it throught the interpreter and nothing changed.

  8. brandonroberts commented on May 16, 2022

    @brandonroberts
    Contributor

    @saibotma 👋🏿 following up on this issue. Is this still relevant for you?

  9. JulianBissekkou commented on May 16, 2022

    @JulianBissekkou

    Just want to mention that this is a feature that is relevant for us as well 👍🏽

  10. saibotma commented on May 16, 2022

    @saibotma
    Author

    @saibotma 👋🏿 following up on this issue. Is this still relevant for you?

    Actually not really at the moment.

  11. saibotma commented on May 16, 2022

    @saibotma
    Author

    Yeah @brandonroberts, @JulianBissekkou should now be the contact partner, as I am working on a different project now. Totally forgot this.

  12. Aragur commented on May 17, 2022

    @Aragur
    Contributor

    @saibotma 👋🏿 following up on this issue. Is this still relevant for you?

    It's also relevant for me.
    Currently I'm using my own service to send customized emails using a cloud function that is triggered by all the events.
    Not the cleanest solution and realy buggy atm.
    So it would be verry nice to have a feature like this.

  13. brandonroberts commented on May 31, 2022

    @brandonroberts
    Contributor

    @Aragur using cloud functions is buggy or something else?

  14. Aragur commented on Jun 28, 2022

    @Aragur
    Contributor

    @brandonroberts sorry for the late answer.
    The problem was (or maybe still is) that not all actions, which should send an email, had a trigger to call the function.

    Also I think that if you want to send a e-mail for user verification you shouldn't depend on a cloud function which may fail.

    I think a basic implementation to modify or to update the look of the email would be really nice. (Maybe like Gitea).
    If I'm developing an app I at least want to send my user greetings from my app if he signs up and a verification email was sent.

  15. tessamero commented on Jul 20, 2022

    @tessamero

    Hey all, just an update, that this is a plan for the (near) future, but not officially on the roadmap for this year as we have a lot of other major priorities to accomplish that the community wants to see.

    This would also require a lot more discussion. I'd like to see this moved to Discussions :) We can collect any feedback over time to help us with this feature and it'll help get it on the roadmap sooner

  16. locked and limited conversation to collaborators on Jul 20, 2022
  17. converted this issue into a discussion #3576 on Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

backlogenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions