IMAP backend for Django mail package
Project description
Django IMAP backend
IMAP back-end for django.core.mail
package, aimed for uploading messages to specif mailbox, 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 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_MAILBOXES
list. Your's setings.py
should looks like this:
EMAIL_BACKEND = 'django_imap_backend.ImapBackend'
EMAIL_IMAP_MAILBOXES = [
{
'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.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.
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
Built Distribution
Hashes for django-imap-backend-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d3f1c3886abc0db8a48213e7a6ac993c973993be1a8e5d0252de5295f0847bc |
|
MD5 | 8d515ab362dfc83960ae98d837805ec3 |
|
BLAKE2b-256 | b22ce8d5cd163c01f9eed43cabe5f77ce4155a0c64a5f3bc5da07f8d6392d6dd |
Hashes for django_imap_backend-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75fd8e210bf9785cc94c0d345c8084396fd96536f55c9d5beabb87e97b9e6f46 |
|
MD5 | 3e5ac479ac4ef9b725009b6fab495bb9 |
|
BLAKE2b-256 | f244580c2feca221fc931f4fae55f864bc85019176bb7c45a61cb46b8e17aa17 |