mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
lets try this new method.
This commit is contained in:
parent
40263b6670
commit
0de5779dd7
4 changed files with 27 additions and 12 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -13,3 +13,6 @@ dummy_project/*
|
||||||
.tox/
|
.tox/
|
||||||
messages
|
messages
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
|
manage.py
|
||||||
|
old/
|
||||||
|
poetry.lock
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,11 @@ class ImapTransport(EmailTransport):
|
||||||
'DJANGO_MAILBOX_INTEGRATION_TESTING_SUBJECT',
|
'DJANGO_MAILBOX_INTEGRATION_TESTING_SUBJECT',
|
||||||
None
|
None
|
||||||
)
|
)
|
||||||
|
self.delete_message_from_server = getattr(
|
||||||
|
settings,
|
||||||
|
'DJANGO_MAILBOX_DELETE_MESSAGE_FROM_SERVER',
|
||||||
|
True
|
||||||
|
)
|
||||||
self.hostname = hostname
|
self.hostname = hostname
|
||||||
self.port = port
|
self.port = port
|
||||||
self.archive = archive
|
self.archive = archive
|
||||||
|
|
@ -131,7 +136,7 @@ class ImapTransport(EmailTransport):
|
||||||
|
|
||||||
if self.archive:
|
if self.archive:
|
||||||
self.server.uid('copy', uid, self.archive)
|
self.server.uid('copy', uid, self.archive)
|
||||||
|
self.delete_message_from_server:
|
||||||
self.server.uid('store', uid, "+FLAGS", "(\\Deleted)")
|
self.server.uid('store', uid, "+FLAGS", "(\\Deleted)")
|
||||||
self.server.expunge()
|
self.server.expunge()
|
||||||
return
|
return
|
||||||
|
|
|
||||||
10
manage.py
10
manage.py
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_mailbox.tests.settings")
|
|
||||||
|
|
||||||
from django.core.management import execute_from_command_line
|
|
||||||
|
|
||||||
execute_from_command_line(sys.argv)
|
|
||||||
17
pyproject.toml
Normal file
17
pyproject.toml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[tool.poetry]
|
||||||
|
name = "django-ngmailbox"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "I'm forking and making it my own."
|
||||||
|
authors = ["Joe <joe@sunset-crew.com>"]
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.6"
|
||||||
|
Django = "^3.1.6"
|
||||||
|
|
||||||
|
[tool.poetry.dev-dependencies]
|
||||||
|
pytest = "^6.2.2"
|
||||||
|
pytest-django = "^4.1.0"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core>=1.0.0"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue