Skip to main content

View emails in development without actually sending them.

Project description

https://badge.fury.io/py/django-mail-viewer.png https://github.com/jmichalicek/django-mail-viewer/workflows/Python%20package/badge.svg

View emails in development without actually sending them.

Documentation

The full documentation is at https://django-mail-viewer.readthedocs.io.

Quickstart

Install Django Mail Viewer:

pip install django-mail-viewer

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_mail_viewer',
    ...
)

Add Django Mail Viewer’s URL patterns:

# You may want to only include this in development environments

urlpatterns = [
    ...
    path('', include('django_mail_viewer.urls')),
    ...
]

Set your EMAIL_BACKEND in settings.py:

EMAIL_BACKEND = 'django_mail_viewer.backends.locmem.EmailBackend'

Features

  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

TODO

  • Passthrough backend - store the email for display in the views but also pass to another backend which may actually send

  • Redis backend using Redis specific functionality for cleaner code and less risk of bugs vs the django cache backend

  • Memcached backend

  • File based backend - store each email as its own file

  • Other backends? ElasticSearch? MongoDB?

  • Separate views for each of html, plaintext, attachements, etc. to allow for more customization of display?

Credits

Tools used in rendering this package:

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-mail-viewer-2.0.0.tar.gz (27.2 kB view hashes)

Uploaded source

Built Distribution

django_mail_viewer-2.0.0-py2.py3-none-any.whl (22.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page