-----------

A simple application to manage emails sent by a Django application.
# Installation
```
pip install django-email-manager
```
or
```
# Download zip file
# Extract it
# Execute in the extracted directory: python setup.py install
```
#### Upgrade
```
pip install django-email-manager --upgrade --no-deps
```
# Motivation
* <http://djangopackages.com/grids/g/email>
* Problem: Bad control of what and how many e-mails have being sent to users.
* Solution: A simple table that log a summary of each e-mail had been sent.
A daily routine avoid this table grows uncontrolled and use the data to generate statistics.
* Problem: Important e-mails are deleted from the database when a user change his e-mail.
* Solution: A simple table that store all e-mails independently.
* Usually, good systems do not send attachments by e-mail because this a open door to attacks.
# Configuration
* settings.py:
```python
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'email_manager',
)
# This attribute activates a listener to store all e-mails independently of auth_user database.
EMAIL_DATABASE_ACTIVATED = True
# If you want to use celery for sending e-mails, you can customize the task name, example:
EMAIL_MANAGER_USING_CELERY = True # default = False
EMAIL_MANAGER_TASK = 'email-manager-task' # default = None
```
* urls.py
```python
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
(r'^email-manager/', include('email_manager.urls', namespace='email_manager', app_name='email_manager')),
)
```
* Templates:
```python
{% url email_manager:define_email_preferences user.id %}
{% if user.is_superuser %}
{% url email_manager:send_email_to_groups %}
{% url email_manager:send_email_to_users %}
{% url email_manager:update_statistics %}
{% endif %}
```
# Usage
* Manual Test:
```
/email-manager/send-email-to-groups/
/email-manager/send-email-to-users/
/email-manager/update-statistics/
/email-manager/define_email_preferences/USER_ID
```
* Send e-mails directly in source code:
```python
from email_manager.feature_send_email import EmailSender
EmailSender().send_email(emails, subject, text_content, html_content, main_content)
EmailSender().send_email_to_users(users, additional_emails, subject, content, html_content, email_type)
EmailSender().send_email_to_groups(groups, additional_emails, subject, content, html_content, email_type)
```
* Manual updating statistics:
```
python manage.py update_email_statistics
```
# Change Log
## Version 0.2.1
* 2012/04/08 (yyyy/mm/dd)
* <http://pypi.python.org/pypi/django-email-manager/0.2.1>
* Fixing configuration of package
## Version 0.2.0
* 2012/02/11 (yyyy/mm/dd)
* <http://pypi.python.org/pypi/django-email-manager/0.2.0>
* Now emails can have types and users can define which types of e-mails they want to receive.
## Version 0.1.0
* 2012/02/05 (yyyy/mm/dd)
* <http://pypi.python.org/pypi/django-email-manager/0.1.0>
* Initial version
# TODO:
* Auto update statistics
* Simple graphs and reports
Metadata
Release files for django-email-manager 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-email-manager-0.2.1.zip | 18.7 kB | Without provenance | Details for django-email-manager-0.2.1.zip |
Release files / django-email-manager-0.2.1.zip
| Download URL | django-email-manager-0.2.1.zip |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cfccae81dcf6972bd2eb35d21b36f763b5dab44a0e99ea86ab83aee1045acd1
|
|
BLAKE2b-256 checksum How to use checksums |
1c825e449c44235ac8e223ef66fd208ab5add8a54d766084972305b5ce4db4ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-email-manager 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.