Metadata-Version: 2.1
Name: django-imap-backend
Version: 0.2.1
Summary: IMAP backend for Django mail package
Home-page: https://github.com/Sibyx/django_imap_backend
Author: Jakub Dubec
Author-email: jakub.dubec@gmail.com
License: MIT
Keywords: django,mail,imap,backend,mailbox
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Framework :: Django :: 3.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Communications :: Email :: Post-Office :: IMAP
Classifier: Topic :: Utilities
Classifier: Environment :: Web Environment
Description-Content-Type: text/markdown
Requires-Dist: Django (>=2.0)

# Django IMAP backend

[![PyPI version](https://badge.fury.io/py/django-imap-backend.svg)](https://badge.fury.io/py/django-imap-backend)

IMAP back-end for `django.core.mail` package, aimed for uploading messages to specif mailboxes, instead of sending it
over SMTP (or other Django email backend). Useful for debugging without fancy services like
[mailtrap.io](https://mailtrap.io/). Library is capable of uploading messages to multiple accounts at once (one email
to multiple mailboxes or accounts).

## Motivation

In last few months I worked on project where we have to send a lot of emails to different mailboxes. We used fake
(and after migration real) e-mail addresses in our staging environment. It was hard to debug these messages without
services like [mailtrap](https://mailtrap.io/) (for which we just didn't want to pay, even it's a pretty cool product,
client's budget is client's budged).

We came up with the idea of uploading ready-to-send emails to IMAP user instead of sending it.

## Installation

```shell script
# Using pip
pip install django-imap-backend

# Using poetry
peotry add django-imap-backend

# Using setup.py
python setup.py install
```

## Configuration

Firstly, have to specify `django_imap_backend.ImapBackend` as your `EMAIL_BACKEND` in `settings.py`. Than you need to
add configuration for your mailboxes in `EMAIL_IMAP_SECRETS` list. Your's `setings.py` should looks like this:

```python
EMAIL_BACKEND = 'django_imap_backend.ImapBackend'
EMAIL_IMAP_SECRETS = [
    {
        'HOST': 'imap.example.com',
        'PORT': None,  # default 143 and for SSL 993
        'USER': 'artuhur.dent',
        'PASSWORD': 'TheQuestion42',
        'MAILBOX': 'my_project',  # Created if not exists
        'SSL': False  # Default
    }
]
```

---
Made with ❤️ and ☕️ by Jakub Dubec & [BACKBONE s.r.o.](https://www.backbone.sk/en/)

# Changelog

## 0.2.1 : 2020-07-19

- **Fix**: Fallback to default `Mailbox` if configuration is not present

## 0.2.0 : 2020-07-10

- **Change**: `EMAIL_IMAP_MAILBOXES` renamed to `EMAIL_IMAP_SECRETS` because of security (we don't want to show IMAP
configuration in Django debug mode)
- **Change**: `sensitive_variables` decoration in IMAP client

## 0.1.1 : 2020-07-05

Fix PyPi release (shit happens).

## 0.1.0 : 2020-07-05

Initial version SSL and support for multiple IMAP accounts.


