Skip to content

Django class-based view and form to send emails.

License

Notifications You must be signed in to change notification settings

thecut/thecut-emailform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f45b701 · May 23, 2017
Dec 20, 2016
May 3, 2017
May 23, 2017
Jun 28, 2016
Dec 20, 2016
May 23, 2017
May 23, 2017
May 23, 2017
Jul 7, 2016
Jan 13, 2015
Jul 5, 2016
Dec 20, 2016
May 23, 2017
Jun 28, 2016
Jul 5, 2016
Jun 30, 2016
May 23, 2017
May 23, 2017

Repository files navigation

thecut-emailform

Documentation Status

Django class-based view and form to send enquiry emails.

Features

  • Send emails using a regular Django form.
  • Use Django templates to generate your email's body.
  • Send HTML / multi-part emails.
  • Add email headers like Cc, Bcc, and Reply-To.

Documentation

The full documentation is at https://thecut-emailform.readthedocs.org.

Quickstart

  1. Install thecut-emailform using the :ref:`installation`.

  2. Create a new form based on :py:class:`thecut.emailform.forms.BaseEmailForm`:

    class MyEmailForm(BaseEmailForm):
    
        # Changing the email address / addresses the email is sent to.
        to_emails = ['[email protected]']
    
  3. Use your new form in a view:

    class MyView(FormView):
    
        form_class = MyEmailForm
    
        def form_valid(self, form):
            form.send_email()
            return super(MyView, self).form_valid(form)
    

Credits

See AUTHORS.rst.