{"id":13448801,"url":"https://github.com/vintasoftware/django-templated-email","last_synced_at":"2025-12-17T15:57:06.288Z","repository":{"id":1071680,"uuid":"1488831","full_name":"vintasoftware/django-templated-email","owner":"vintasoftware","description":"Django module to easily send templated emails using django templates, or using a transactional mail provider (mailchimp, silverpop, etc.)","archived":false,"fork":false,"pushed_at":"2025-09-29T13:37:31.000Z","size":311,"stargazers_count":779,"open_issues_count":6,"forks_count":133,"subscribers_count":52,"default_branch":"develop","last_synced_at":"2025-10-05T21:07:08.034Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vintasoftware.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-03-16T20:27:16.000Z","updated_at":"2025-09-29T13:37:36.000Z","dependencies_parsed_at":"2025-04-14T11:25:32.427Z","dependency_job_id":null,"html_url":"https://github.com/vintasoftware/django-templated-email","commit_stats":{"total_commits":235,"total_committers":35,"mean_commits":6.714285714285714,"dds":0.6808510638297872,"last_synced_commit":"ca1729ae516db747cf8e69dd07681ff8d9c19e36"},"previous_names":["bradwhittington/django-templated-email"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/vintasoftware/django-templated-email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-templated-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-templated-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-templated-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-templated-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vintasoftware","download_url":"https://codeload.github.com/vintasoftware/django-templated-email/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-templated-email/sbom","scorecard":{"id":250512,"data":{"date":"2025-08-04","repo":{"name":"github.com/vintasoftware/django-templated-email","commit":"6c85916fdf790aa950c9da3278e915b515327d63"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":7,"reason":"Found 5/7 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/vintasoftware/django-templated-email/tests.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/vintasoftware/django-templated-email/tests.yml/develop?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:23","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Info: 'allow deletion' disabled on branch 'develop'","Warn: 'force pushes' enabled on branch 'develop'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'develop'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'develop'","Warn: PRs are not required to make changes on branch 'develop'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-7 / GHSA-hxf9-7h4c-f5jv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T08:21:46.429Z","repository_id":1071680,"created_at":"2025-08-17T08:21:46.430Z","updated_at":"2025-08-17T08:21:46.430Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27784503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T06:00:21.439Z","updated_at":"2025-12-17T15:57:06.275Z","avatar_url":"https://github.com/vintasoftware.png","language":"Python","funding_links":[],"categories":["Email","Python"],"sub_categories":[],"readme":"==============================\nDjango-Templated-Email\n==============================\n\n|GitterBadge|_ |PypiversionBadge|_ |PythonVersionsBadge|_ |LicenseBadge|_\n\n:Info: A Django oriented templated email sending class\n:Original Author: Bradley Whittington (http://github.com/bradwhittington, http://twitter.com/darb)\n:Maintained by: Vinta Software: https://www.vinta.com.br/\n:Tests: |GABadge|_ |CoverageBadge|_\n\n\nOverview\n=================\ndjango-templated-email is oriented towards sending templated emails.\nThe library supports template inheritance, adding cc'd and bcc'd recipients,\nconfigurable template naming and location.\n\nThe send_templated_email method can be thought of as the render_to_response\nshortcut for email.\n\nMake sure you are reading the correct documentation:\n\ndevelop branch: https://github.com/vintasoftware/django-templated-email/blob/develop/README.rst\n\nstable pypi/main: https://github.com/vintasoftware/django-templated-email/blob/main/README.rst\n\n\nRequirements\n=================\n* Python (3.9*, 3.10, 3.11, 3.12, 3.13)\n* Django (4.2, 5.0, 5.1)\n\nWe **highly recommend** and only officially support the latest patch release of\neach Python and Django series.\n\nPython 3.9 is no longer supported in Django 5.0 and newer, so is only supported with Django 4.2.\n\n\nGetting going - installation\n==============================\n\nInstalling::\n\n    pip install django-templated-email\n\nYou can add the following to your settings.py (but it works out the box):\n\n.. code-block:: python\n\n    TEMPLATED_EMAIL_BACKEND = 'templated_email.backends.vanilla_django.TemplateBackend'\n\n    # You can use a shortcut version\n    TEMPLATED_EMAIL_BACKEND = 'templated_email.backends.vanilla_django'\n\n    # You can also use a class directly\n    from templated_email.backends.vanilla_django import TemplateBackend\n    TEMPLATED_EMAIL_BACKEND = TemplateBackend\n\n\nSending templated emails\n==============================\n\nExample usage using vanilla_django TemplateBackend backend\n\nPython to send mail:\n\n.. code-block:: python\n\n    from templated_email import send_templated_mail\n    send_templated_mail(\n            template_name='welcome',\n            from_email='from@example.com',\n            recipient_list=['to@example.com'],\n            context={\n                'username':request.user.username,\n                'full_name':request.user.get_full_name(),\n                'signup_date':request.user.date_joined\n            },\n            # Optional:\n            # cc=['cc@example.com'],\n            # bcc=['bcc@example.com'],\n            # headers={'My-Custom-Header':'Custom Value'},\n            # template_prefix=\"my_emails/\",\n            # template_suffix=\"email\",\n    )\n\nIf you would like finer control on sending the email, you can use **get_templated_email**, which will return a django **EmailMessage** object, prepared using the **vanilla_django** backend:\n\n.. code-block:: python\n\n    from templated_email import get_templated_mail\n    get_templated_mail(\n            template_name='welcome',\n            from_email='from@example.com',\n            to=['to@example.com'],\n            context={\n                'username':request.user.username,\n                'full_name':request.user.get_full_name(),\n                'signup_date':request.user.date_joined\n            },\n            # Optional:\n            # cc=['cc@example.com'],\n            # bcc=['bcc@example.com'],\n            # headers={'My-Custom-Header':'Custom Value'},\n            # template_prefix=\"my_emails/\",\n            # template_suffix=\"email\",\n    )\n\nYou can also **cc** and **bcc** recipients using **cc=['example@example.com']**.\n\nYour template\n-------------\n\nThe templated_email/ directory needs to be the templates directory.\n\nThe backend will look in *my_app/templates/templated_email/welcome.email* :\n\n.. code-block:: python\n\n    {% block subject %}My subject for {{username}}{% endblock %}\n    {% block plain %}\n      Hi {{full_name}},\n\n      You just signed up for my website, using:\n          username: {{username}}\n          join date: {{signup_date}}\n\n      Thanks, you rock!\n    {% endblock %}\n\nIf you want to include an HTML part to your emails, simply use the 'html' block :\n\n.. code-block:: python\n\n    {% block html %}\n      \u003cp\u003eHi {{full_name}},\u003c/p\u003e\n\n      \u003cp\u003eYou just signed up for my website, using:\n          \u003cdl\u003e\n            \u003cdt\u003eusername\u003c/dt\u003e\u003cdd\u003e{{username}}\u003c/dd\u003e\n            \u003cdt\u003ejoin date\u003c/dt\u003e\u003cdd\u003e{{signup_date}}\u003c/dd\u003e\n          \u003c/dl\u003e\n      \u003c/p\u003e\n\n      \u003cp\u003eThanks, you rock!\u003c/p\u003e\n    {% endblock %}\n\nThe plain part can also be calculated from the HTML using `html2text \u003chttps://pypi.python.org/pypi/html2text\u003e`_. If you don't specify the plain block and `html2text \u003chttps://pypi.python.org/pypi/html2text\u003e`_ package is installed, the plain part will be calculated from the HTML part. You can disable this behaviour in settings.py :\n\n.. code-block:: python\n\n    TEMPLATED_EMAIL_AUTO_PLAIN = False\n\nYou can also specify a custom function that converts from HTML to the plain part :\n\n.. code-block:: python\n\n    def convert_html_to_text(html):\n        ...\n\n    TEMPLATED_EMAIL_PLAIN_FUNCTION = convert_html_to_text\n\nYou can globally override the template dir, and file extension using the following variables in settings.py :\n\n.. code-block:: python\n\n    TEMPLATED_EMAIL_TEMPLATE_DIR = 'templated_email/' #use '' for top level template dir, ensure there is a trailing slash\n    TEMPLATED_EMAIL_FILE_EXTENSION = 'email'\n\nYou can also set a value for **template_prefix** and **template_suffix** for every time you call **send_templated_mail**, if you wish to store a set of templates in a different directory. Remember to include a trailing slash.\n\nUsing with `Django Anymail \u003chttps://github.com/anymail/django-anymail\u003e`_\n=========================================================================\n\nAnymail integrates several transactional email service providers (ESPs) into Django, with a consistent API that lets you use ESP-added features without locking your code to a particular ESP. It supports Mailgun, Postmark, SendGrid, SparkPost and more.\n\nYou can use it with django-templated-email, just follow their instructions in their `quick start \u003chttps://anymail.readthedocs.io/en/latest/quickstart/\u003e`_ to configure it.\n\nOptionally you can use their custom `EmailMessage \u003chttps://anymail.readthedocs.io/en/latest/sending/anymail_additions/#anymail.message.AnymailMessage\u003e`_ class with django-templated-email by using the following settings:\n\n.. code-block:: python\n\n    # This replaces django.core.mail.EmailMessage\n    TEMPLATED_EMAIL_EMAIL_MESSAGE_CLASS='anymail.message.AnymailMessage'\n\n    # This replaces django.core.mail.EmailMultiAlternatives\n    TEMPLATED_EMAIL_EMAIL_MULTIALTERNATIVES_CLASS='anymail.message.AnymailMessage'\n\n\nInline images\n==============\n\nYou can add inline images to your email using the *InlineImage* class.\n\nFirst get the image content from a file or a *ImageField*:\n\n.. code-block:: python\n\n    # From a file\n    with open('pikachu.png', 'rb') as pikachu:\n      image = pikachu.read()\n\n    # From an ImageField\n    # Suppose we have this model\n    class Company(models.Model):\n      logo = models.ImageField()\n\n    image = company.logo.read()\n\nThen create an instance of *InlineImage*:\n\n.. code-block:: python\n\n    from templated_email import InlineImage\n\n    inline_image = InlineImage(filename=\"pikachu.png\", content=image)\n\nNow pass the object on the context to the template when you send the email.\n\n.. code-block:: python\n\n    send_templated_mail(template_name='welcome',\n                        from_email='from@example.com',\n                        recipient_list=['to@example.com'],\n                        context={'pikachu_image': inline_image})\n\nFinally in your template add the image on the html template block:\n\n.. code-block:: html\n\n    \u003cimg src=\"{{ pikachu_image }}\"\u003e\n\nNote: All *InlineImage* objects you add to the context will be attached to the e-mail, even if they are not used in the template.\n\n\nAdd link to view the email on the web\n=====================================\n\n.. code-block:: python\n\n    # Add templated email to INSTALLED_APPS\n    INSTALLED_APPS = [\n      ...\n      'templated_email'\n    ]\n\n.. code-block:: python\n\n    # and this to your url patterns\n    url(r'^', include('templated_email.urls', namespace='templated_email')),\n\n.. code-block:: python\n\n    # when sending the email use the *create_link* parameter.\n    send_templated_mail(\n        template_name='welcome', from_email='from@example.com',\n        recipient_list=['to@example.com'],\n        context={}, create_link=True)\n\nAnd, finally add the link to your template.\n\n.. code-block:: html\n\n    \u003c!-- With the 'if' the link will only appear on the email. --\u003e\n    {% if email_uuid %}\n      \u003c!-- Note: you will need to add your site since you will need to access\n                 it from the email --\u003e\n      You can view this e-mail on the web here:\n      \u003ca href=\"http://www.yoursite.com{% url 'templated_email:show_email' uuid=email_uuid %}\"\u003e\n        here\n      \u003c/a\u003e\n    {% endif %}\n\nNotes:\n  - A copy of the rendered e-mail will be stored on the database. This can grow\n    if you send too many e-mails. You are responsible for managing it.\n  - If you use *InlineImage* all images will be uploaded to your media storage,\n    keep that in mind too.\n\n\nClass Based Views\n==================\n\nIt's pretty common for emails to be sent after a form is submitted. We include a mixin\nto be used with any view that inherit from Django's FormMixin.\n\nIn your view add the mixin and the usual Django's attributes:\n\n.. code-block:: python\n\n    from templated_email.generic_views import TemplatedEmailFormViewMixin\n\n    class AuthorCreateView(TemplatedEmailFormViewMixin, CreateView):\n        model = Author\n        fields = ['name', 'email']\n        success_url = '/create_author/'\n        template_name = 'authors/create_author.html'\n\nBy default the template will have the *form_data* if the form is valid or *from_errors* if the\nform is not valid in it's context.\n\nYou can view an example `here \u003ctests/generic_views/\u003e`_\n\nNow you can use the following attributes/methods to customize it's behavior:\n\nAttributes:\n\n**templated_email_template_name** (mandatory if you don't implement **templated_email_get_template_names()**):\n    String naming the template you want to use for the email.\n    ie: templated_email_template_name = 'welcome'.\n\n**templated_email_send_on_success** (default: True):\n    This attribute tells django-templated-email to send an email if the form is valid.\n\n**templated_email_send_on_failure** (default: False):\n    This attribute tells django-templated-email to send an email if the form is invalid.\n\n**templated_email_from_email** (default: **settings.TEMPLATED_EMAIL_FROM_EMAIL**. If it's also not defined, falls back to **DEFAULT_FROM_EMAIL**):\n    String containing the email to send the email from.\n\nMethods:\n\n**templated_email_get_template_names(self, valid)** (mandatory if you don't set **templated_email_template_name**):\n    If the method returns a string it will use it as the template to render the email. If it returns a list it will send\n    the email *only* with the first existing template.\n\n**templated_email_get_recipients(self, form)** (mandatory):\n    Return the recipient list to whom the email will be sent to.\n    ie:\n\n.. code-block:: python\n\n      def templated_email_get_recipients(self, form):\n          return [form.data['email']]\n\n**templated_email_get_context_data(**kwargs)** (optional):\n    Use this method to add extra data to the context used for rendering the template. You should get the parent class's context from\n    calling super.\n    ie:\n\n.. code-block:: python\n\n      def templated_email_get_context_data(self, **kwargs):\n          context = super(ThisClassView, self).templated_email_get_context_data(**kwargs)\n          # add things to context\n          return context\n\n**templated_email_get_send_email_kwargs(self, valid, form)** (optional):\n    Add or change the kwargs that will be used to send the e-mail. You should call super to get the default kwargs.\n    ie:\n\n.. code-block:: python\n\n    def templated_email_get_send_email_kwargs(valid, form):\n      kwargs = super(ThisClassView, self).templated_email_get_send_email_kwargs(valid, form)\n      kwargs['bcc'] = ['admin@example.com']\n      return kwargs\n\n**templated_email_send_templated_mail(*args, **kwargs)** (optional):\n    This method calls django-templated-email's *send_templated_mail* method. You could change this method to use\n    a celery's task for example or to handle errors.\n\n\nSettings\n=============\n\nYou can configure Django-Templated-Email by setting the following settings\n\n.. code-block:: python\n\n    TEMPLATED_EMAIL_FROM_EMAIL = None                 # String containing the email to send the email from - fallback to DEFAULT_FROM_EMAIL  \n    TEMPLATED_EMAIL_BACKEND = TemplateBackend         # The backend class that will send the email, as a string like 'foo.bar.TemplateBackend' or the class reference itself\n    TEMPLATED_EMAIL_TEMPLATE_DIR = 'templated_email/' # The directory containing the templates, use '' if using the top level\n    TEMPLATED_EMAIL_FILE_EXTENSION = 'email'          # The file extension of the template files\n    TEMPLATED_EMAIL_AUTO_PLAIN = True                 # Set to false to disable the behavior of calculating the plain part from the html part of the email when `html2text \u003chttps://pypi.python.org/pypi/html2text\u003e` is installed\n    TEMPLATED_EMAIL_PLAIN_FUNCTION = None             # Specify a custom function that converts from HTML to the plain part\n\n    # Specific for anymail integration:\n    TEMPLATED_EMAIL_EMAIL_MESSAGE_CLASS = 'django.core.mail.EmailMessage'                     # Replaces django.core.mail.EmailMessage\n    TEMPLATED_EMAIL_EMAIL_MULTIALTERNATIVES_CLASS = 'django.core.mail.EmailMultiAlternatives' # Replaces django.core.mail.EmailMultiAlternatives\n\nManagement Commands\n===================\n\n**sendtesttemplatedemail**\n\nThis command allows you to send test emails using django-templated-email. It supports the same arguments as Django's built-in `sendtestemail` command, making it easy to test your email configuration and delivery.\n\nFuture Plans\n=============\n\nSee https://github.com/vintasoftware/django-templated-email/issues?state=open\n\nUsing django_templated_email in 3rd party applications\n=======================================================\n\nIf you would like to use django_templated_email to handle mail in a reusable application, you should note that:\n\n* Your calls to **send_templated_mail** should set a value for **template_dir**, so you can keep copies of your app-specific templates local to your app (although the loader will find your email templates if you store them in *\u003cyour app\u003e/templates/templated_email*, if **TEMPLATED_EMAIL_TEMPLATE_DIR** has not been overridden)\n* If you do (and you should) set a value for **template_dir**, remember to include a trailing slash, i.e. *'my_app_email/'*\n* The deployed app may use a different backend which doesn't use the django templating backend, and as such make a note in your README warning developers that if they are using django_templated_email already, with a different backend, they will need to ensure their email provider can send all your templates (ideally enumerate those somewhere convenient)\n\nNotes on specific backends\n==============================\n\nUsing vanilla_django\n--------------------------\n\nThis is the default backend, and as such requires no special configuration, and will work out of the box. By default it assumes the following settings (should you wish to override them):\n\n.. code-block:: python\n\n    TEMPLATED_EMAIL_TEMPLATE_DIR = 'templated_email/' #Use '' for top level template dir\n    TEMPLATED_EMAIL_FILE_EXTENSION = 'email'\n\nFor legacy purposes you can specify email subjects in your settings file (but, the preferred method is to use a **{% block subject %}** in your template):\n\n.. code-block:: python\n\n    TEMPLATED_EMAIL_DJANGO_SUBJECTS = {\n        'welcome':'Welcome to my website',\n    }\n\nAdditionally you can call **send_templated_mail** and optionally override the following parameters::\n\n    from_email='your.email@com/'          # Override the email sender. Default: (default: **settings.TEMPLATED_EMAIL_FROM_EMAIL**. If it's also not defined, falls back to **DEFAULT_FROM_EMAIL**)\n    template_prefix='your_template_dir/'  # Override where the method looks for email templates (alternatively, use template_dir)\n    template_suffix='email'               # Override the file extension of the email templates (alternatively, use file_extension)\n    cc=['fubar@example.com']              # Set a CC on the mail\n    bcc=['fubar@example.com']             # Set a BCC on the mail\n    template_dir='your_template_dir/'     # Override where the method looks for email templates\n    connection=your_connection            # Takes a django mail backend connection, created using **django.core.mail.get_connection**\n    auth_user='username'                  # Override the user that the django mail backend uses, per **django.core.mail.send_mail**\n    auth_password='password'              # Override the password that the django mail backend uses, per **django.core.mail.send_mail**\n\nUsing templated_email_md\n------------------------\n\nThis is a third-party backend that uses Markdown to render the email templates. \n\nFor installation and usage, see the `django-templated-email-md \u003chttps://github.com/OmenApps/django-templated-email-md/\u003e`_ repository, and the associated `documentation \u003chttps://django-templated-email-md.readthedocs.io/\u003e`_.\n\nReleasing a new version of this package:\n========================================\n\n- Create a new branch off develop, named like *feat/update-to-x.y.z* where x.y.z is the new version number.\n\n- Update CHANGELOG file.\n\n- Update the version executing::\n\n    bumpversion [major,minor,patch]\n\n- Open a pull request to merge your branch into main, and get it reviewed.\n\n- Once the pull request is approved and merged, checkout main branch and pull the latest changes.\n\n- Push the tag generated by bumpversion to the remote repository::\n\n    git push origin --tags\n\n- Create a new release on GitHub, using the tag created by bumpversion. Make sure to use the same version number as the one you set with bumpversion.\n\n- Finally, publish the new version to PyPI executing::\n\n    python -m build\n    python -m twine upload dist/*\n\n- Update develop branch with the changes from main, and push it to the remote repository::\n\n    git checkout develop\n    git pull origin main\n    git push origin develop\n\nCommercial Support\n==================\n\n.. image:: https://avatars2.githubusercontent.com/u/5529080?s=80\u0026v=4\n  :alt: Vinta Logo\n  :target: https://www.vinta.com.br\n\nThis project, as other `Vinta Software \u003chttps://www.vinta.com.br/\u003e`_ open-source projects is used in products of Vinta's clients. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: contact@vinta.com.br\n\n\n\n.. _Django: http://djangoproject.com\n.. |GitterBadge| image:: https://badges.gitter.im/vintasoftware/django-templated-email.svg\n.. _GitterBadge: https://gitter.im/vintasoftware/django-templated-email?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n.. |GABadge| image:: https://github.com/vintasoftware/django-templated-email/actions/workflows/tests.yml/badge.svg\n.. _GABadge: https://github.com/vintasoftware/django-templated-email/actions\n.. |CoverageBadge| image:: https://coveralls.io/repos/github/vintasoftware/django-templated-email/badge.svg?branch=develop\n.. _CoverageBadge: https://coveralls.io/github/vintasoftware/django-templated-email?branch=develop\n.. |PypiversionBadge| image:: https://img.shields.io/pypi/v/django-templated-email.svg\n.. _PypiversionBadge: https://pypi.python.org/pypi/django-templated-email\n.. |PythonVersionsBadge| image:: https://img.shields.io/pypi/pyversions/django-templated-email.svg\n.. _PythonVersionsBadge: https://pypi.python.org/pypi/django-templated-email\n.. |LicenseBadge| image:: https://img.shields.io/pypi/l/django-templated-email.svg\n.. _LicenseBadge: https://github.com/vintasoftware/django-templated-email/blob/develop/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-templated-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvintasoftware%2Fdjango-templated-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-templated-email/lists"}