Skip to main content

Application for switching from Django plain-text emails to html emails with 2 bodies: html and plain-text, generated automatically from html

Project description

# Django Email HTML

[![Build Status](https://travis-ci.org/ramusus/django-email-html.png?branch=master)](https://travis-ci.org/ramusus/django-email-html)

This application can be used for quickly switching all emails of site from plain-text to html. For using it you need to do 2 steps:

  • add email_html to INSTALLED_APPS higher, then other third-part applications;

  • change email templates to html version;

Application substitutes built-in send_mail function by new smart send_mail function.

build-in:

send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None)

new one:

send_mail(subject, message, from_email=None, recipient_list=None, fail_silently=False, auth_user=None, auth_password=None, connection=None)

## Few new features:

  • message attribute using for html or plain-test message body. If it contains html, plain-text is generating automatically basing on html body;

  • from_email attribute is not required. By default it will be equal to settings.DEFAULT_FROM_EMAIL;

  • Depending on settings.EMAIL_ADMIN_DUPLICATE all copies of email messages also sending to ADMIN emails (using bcc header);

New function cam be used:

send_mail(subj, html, recipient_list=emails)

## Requirements:

  • BeautifulSoup

  • w3m (for generating plain-text from html)

## Important things:

  • Place email_html application in INSTALLED_APPS before all other applications, which sending emails, that you need to make html based by default;

  • Html body must contains <html> tag, otherwise function would think this is a plain-text body;

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-email-html-0.1.2.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file django-email-html-0.1.2.tar.gz.

File metadata

File hashes

Hashes for django-email-html-0.1.2.tar.gz
Algorithm Hash digest
SHA256 78575c3b815ba6c3f5e4f466d3ab924caf65c15e08d841cc1b54a838e7f85852
MD5 544f38914ee6688a538b8af5707f8e0f
BLAKE2b-256 0ce7ec3c670585b0583e977c8d327d0f18a5e438cabdd49d3a111dc5c2d35661

See more details on using hashes here.

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