1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00
Commit graph

148 commits

Author SHA1 Message Date
Youssef Badzi
0be2afdec8
add support of remote storage 2024-12-27 12:38:49 +01:00
Pascal F
6dcded0e75
Improve documentation and flake8 2024-05-24 09:25:54 +02:00
Pascal F
88e17ea684
Fix typing 2024-05-24 08:37:37 +02:00
Pascal F
7337d3130e
Improve documentation 2024-05-24 08:10:46 +02:00
Pascal F
bb924f1f4d
Add minimal type check 2024-04-03 11:37:21 +02:00
Akshet Pandey
fbaa378e59 Close connections after we are done with them 2024-02-28 11:42:21 -08:00
Pietro
7570a0d37a
Update django_mailbox/models.py
Co-authored-by: Pascal Fouque <pfouque@users.noreply.github.com>
2023-12-27 00:40:48 +01:00
Pietro Mingo
21faa22404 MailboxAttachment __str__ change 2023-12-24 12:53:18 +01:00
Pietro
dd37322a61
Merge pull request #273 from martinmanzo/master
Close attachments
2023-12-23 21:01:28 +01:00
Pietro
997bed0164
Merge pull request #230 from rmlt/fix_message_rfc822_attachments__based_on_master
Fix message/rfc822 attachment processing
2023-12-19 22:43:59 +01:00
Pascal F
0f82c95ca0
Make eml field Blankable 2023-12-17 06:27:45 +01:00
Pascal F
7fde5f7165
Support for Django 5.0 and python 3.12 + Fix CI (#277)
* Upgrade to last Django & Python supported versions

* flake8 fixes

* Add CI

* Add final version of Django 5.0
2023-12-09 19:01:53 -08:00
Martin Manzo
7e250b2504 Close attachments 2023-08-11 10:33:45 -03:00
Jace Manshadi
462fdd3e49
updating location of logic for getmail command (#264)
* moving logic for processing all the new emails from all mailboxes to a method under Mailbox so it can be called from other modules

* moving logger lines into handle method as requested
2023-01-24 06:08:47 -08:00
Pietro Mingo
cefbcdebd2
Office365 API mailbox support (#251)
* Update models.py, __init__.py, and office365.py

* Update setup.py

* Office365Transport properties

* Update .gitignore

* wrong folder stage

* Update models.py

* Update office365.py and models.py

* office365 implementation

* Update office365.py

* clear code

* fix import

* Update readme.rst

* archive and delete

* fix and documentation

* removed build folder

* missing archive

Co-authored-by: Pietro Mingo <p.mingo@intac.it>
Co-authored-by: Serafim Bordei <s.bordei@intac.it>
2023-01-16 13:23:38 -08:00
Adam Dobrawy
5abc1981dc
Add tests docs to CI and fix docs warning (#238)
* Add tests docs to CI and fix docs warning

* Switch to storing environment variables in travis outside of secure vars.

* Force a rebuild.

* Force a rebuild.

* Run integration tests just once per test run.

* Minor updates.

* Nevermind; this test class covers more than just integration tests.

* Attempting to fix docs build via https://stackoverflow.com/questions/61711710/runtimeerror-class-not-set-defining-abstractbaseuser-as-class-django-co\#comment112739057_63045563

* Minor docs fix.

Co-authored-by: Adam Coddington <me@adamcoddington.net>
2020-12-06 18:10:15 -08:00
Miłosz Jerkiewicz
5bd961fae6 Fix message/rfc822 attachment processing 2020-08-05 12:30:00 +02:00
George Cheng
b3c38be70e refine inferitance 2020-07-26 14:22:40 +08:00
George Cheng
0c6f6aa6ce Move the bulk get_new_mail to queryset 2020-07-26 14:21:21 +08:00
Adam Dobrawy
2b2b7d6392 Modernize syntax, drop Python EOL, drop drop Django<1.11, upgrade TravisCI config to v1, add Python 3.8 & Django 3.x 2019-11-09 19:23:08 +01:00
Adam Dobrawy
e0687380a1 Cache email object in Message (#148)
* Cache email object in Message

* Email object cache flush in some tests
2018-03-09 10:10:07 -08:00
Adam Dobrawy
2b2bdb9825 Use generator in Mailbox.get_mail to limit memory leak (#149)
* Use generator in Mailbox.get_mail to limit memory leak

* Fix generator support in tests/base.py
2018-03-09 10:09:45 -08:00
Denis
7252295601 Django 2.0 Preps - on_delete=models.CASCADE in models & migrations (#153)
* Update models.py for django 2.0

on_delete=models.CASCADE on all relationships

* on_delete=models.CASCADE in 0001_initial.py

Django 2.0 preps
2017-12-05 07:53:18 -08:00
Adam Dobrawy
9f8d653ada Add python_2_unicode_compatible in models 2017-07-11 08:17:17 +02:00
Adam Dobrawy
cedef9d81c Fix PY3 compatibility of compression 2017-07-09 20:47:48 +02:00
Adam Dobrawy
aa9f230558 Add support to compression of original messages 2017-07-09 20:38:29 +02:00
Ivlev Denis
29fa6faad5 Add verbose_name for models 2017-07-09 13:34:50 +03:00
Adam Dobrawy
89b2d3a105 Merge pull request #137 from sumpfralle/master
Fix handling of missing 'content-transfer-encoding' header
2017-05-10 14:19:28 +02:00
Lars Kruse
234ed00909 Add flake8 style check 2017-05-09 23:59:42 +02:00
Lars Kruse
e4a8a05f3d Fix handling of missing 'content-transfer-encoding' header
Closes: #136

Python's email module raises a KeyError if the header
'content-transfer-encoding' is missing:
  https://bugs.python.org/issue27321
2017-05-09 23:28:19 +02:00
Adam Dobrawy
251b12161c Fix grammar of Mailbox.last_polling.help_text 2016-08-16 07:18:51 +02:00
Adam Dobrawy
fc05ee6505 Fix backward compatibility to django<1.5 in Mailbox.get_new_mail 2016-08-16 01:10:55 +02:00
Adam Dobrawy
086bcd3acd Add Mailbox.last_polling model field 2016-08-16 01:00:26 +02:00
Adam Coddington
f524031965 [#100] Do not insert unix 'From' header in saved messages. 2016-06-20 21:16:23 -07:00
Adam Coddington
d75d838e26 [#97] Do not attempt to convert filename top unicode if no filename was available. 2016-05-18 12:57:56 -07:00
Steeve
8a73076427 add imaps STARTTLS support (#94)
* add imaps STARTTLS support using +tls

* documentation on STARTTLS
2016-05-15 12:05:11 -07:00
Adam Coddington
5b1ed1c66f Properly decode encoded filename headers. Fixes #96. 2016-05-14 23:37:49 -07:00
Adam Coddington
1c29cefa08 [#96] Fixing handling for unicode filename retrieval on python 2. 2016-05-14 23:31:55 -07:00
Adam Coddington
a00f837150 Return unicode-converted filename only if a response was returned. 2016-05-14 22:29:23 -07:00
Adam Coddington
276917c6e6 [#96] Decode attachment filenames into unicodes. 2016-05-14 22:19:03 -07:00
Adam Coddington
b4a3cdc843 Switch from nose to py.test. 2016-05-14 22:06:32 -07:00
antcorro
3c33a22c3e Fix for #82; Improper handling of badly-encoded documents.
* fix logging warning message

* decode as ascii on Decode error

* Add test case for #88 #82

* add test case bis for #88 #82
2016-04-04 12:28:11 -07:00
Justin Standring
7fdfa4bb0f Fixed encoding error when saving messages to file (fixes #85) 2016-03-17 09:44:08 +13:00
Adam Coddington
9538996dea Fixes build failures on Python 3.x.
Squashed commit of the following:

commit f3a782d0b0
Author: Adam Coddington <me@adamcoddington.net>
Date:   Sat Jan 30 22:32:51 2016 -0800

    Django 1.7 does not support Python 3.5.

commit c100ccf867
Author: Adam Coddington <me@adamcoddington.net>
Date:   Sat Jan 30 22:28:09 2016 -0800

    Ensure that message_id is always stripped.

commit ee5a023da1
Author: Adam Coddington <me@adamcoddington.net>
Date:   Sat Jan 30 22:24:27 2016 -0800

    Modern python versions do not have --use-mirrors.

commit 54aa74d984
Author: Adam Coddington <me@adamcoddington.net>
Date:   Sat Jan 30 22:19:59 2016 -0800

    Turn off sudo mode for django-mailbox.
2016-01-30 22:35:20 -08:00
Adam Dobrawy
51edeca7dc Use ugettext_lazy instead ugettext in models.py 2015-11-27 01:50:01 +01:00
Antonio Corroppoli
e766174fdd Fix UnicodeDecodeError in MessageAttachment headers 2015-08-14 14:48:27 +02:00
Adam Dobrawy
0e4fb95a39 Turn on exception for incoming messages
> Errors should never pass silently

I waste a hours to debug that . I don't expect this kind of behaviour. In my app proccess incoming mails is critical and I should receive exception and on fail transaction should rollback everything and try again later.
2015-08-04 16:14:29 +02:00
Adam Coddington
ff433a24f4 Always store payload parts having a Content-Disposition of 'attachment' as attachments, even if their Content-Type is text/plain. Fixes #52.
Squashed commit of the following:

commit 5bcbac33d6
Author: Adam Coddington <me@adamcoddington.net>
Date:   Tue Jul 7 23:05:15 2015 -0700

    Add handling for situations in which the message was deleted in another thread before processing.

commit 6183f68b39
Author: Adam Coddington <me@adamcoddington.net>
Date:   Tue Jul 7 22:58:15 2015 -0700

    Always store message as attachment if its content-disposition is marked as such.

commit 4c16494b1a
Author: Adam Coddington <me@adamcoddington.net>
Date:   Tue Jul 7 22:46:52 2015 -0700

    Adding a (hopefully) failing test case for #52.
2015-07-07 23:09:41 -07:00
Adam Coddington
95f4d5c7ff Be sure to pass the condition on through to the underlying transport. 2015-07-07 22:30:53 -07:00
Adam Coddington
988cb7504f Adding a more-versatile condition-handling method for preventing integration tests from mashing on one another. 2015-07-07 22:22:15 -07:00