Skip to main content

Django email tools.

Project description

Setup

pip install django-mailmate

How-To

In emails.py

from mailmate.templates import TemplatedEmailMessage

class CoolMessage(TemplatedEmailMessage):
    to = ['some-user@some-email.com']
    from_email = 'no-reply@some-email.com'
    subject = 'Super Cool Message'
    template_name = 'emails/text-template.txt'
    html_template_name = 'emails/html-template.html'

In views.py

from .emails import CoolMessage
CoolMessage(extra_context={'user': 'You', 'is': 'Cool'}).send()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-mailmate-1.0.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page