Skip to content

[feature request] Enhance email customization with subject, from and cc #290

@rptmat57

Description

@rptmat57

This is a follow up on #265

Here is what I am thinking:

  1. adding more variable to the TemplatesCustomization class like this:
    def __init__(self, *args, **kwargs):
        for email_template, extension in self.files:
            self.__class__.variables[f"{email_template}_subject"] = ""
            self.__class__.variables[f"{email_template}_send_from"] = ""
            self.__class__.variables[f"{email_template}_cc_addresses"] = ""
        super().__init__(*args, **kwargs)
  1. the subject would be a django template string, allowing things like {{ variable }} following the same provided vars as the ones in the email template
  2. the send_from would have a datalist html widget with a few predefined choices (user_office, abuse, creator, server_email, etc) and allow custom entry.
  3. the cc_addresses would allow multiple entries
  4. for #3 and #4 we could also simply use variable resolution to allow {{ user_office_email }} for example.
  5. for all the default values, I think the only way here would be to create a data migration that would add all the current send_from and subject and cc_addresses
  6. this would be available in the "file & email templates" page
  7. we would need a way to differentiate emails from other files/fragments (maybe using the extension email instead of html and having code to change it to html when loading the actual media file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions