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. 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 (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
# 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:
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.
Changelog
0.2.3 : 2020-07-19
- Fix: Version files update 🤦♀️ Once again...
0.2.2 : 2020-07-19
- Fix: Version files update 🤦♀️
0.2.1 : 2020-07-19
- Fix: Fallback to default
Mailboxif configuration is not present
0.2.0 : 2020-07-10
- Change:
EMAIL_IMAP_MAILBOXESrenamed toEMAIL_IMAP_SECRETSbecause of security (we don't want to show IMAP configuration in Django debug mode) - Change:
sensitive_variablesdecoration 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.
Metadata
Release files for django-imap-backend 0.2.3
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 | |
|---|---|---|---|---|
| django-imap-backend-0.2.3.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_imap_backend-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / django-imap-backend-0.2.3.tar.gz
| Download URL | django-imap-backend-0.2.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4aa2d57d7f0ee1ee85cff50533119abfcb108babc8bc7498d59461f12041175
|
|
BLAKE2b-256 checksum How to use checksums |
96bbc6ef3ff31011d7711ea796865564659b1e73b3f2b259cf282a6e384f824c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|
Release files / django_imap_backend-0.2.3-py3-none-any.whl
| Download URL | django_imap_backend-0.2.3-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98652a458189ff0f5876eb04d01b20d5e3003a24e84d4641f71bfa7a5f3864e6
|
|
BLAKE2b-256 checksum How to use checksums |
e76a943d51374364afb235941353c3d335bd289195faaca73e1732697f27fcbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|
Security for django-imap-backend 0.2.3
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.