Commit Graph

75 Commits

Author SHA1 Message Date
Sam Splunks
2fc95d165a new_ticket_done signal emitted through email 2024-04-17 10:19:50 +00:00
Sam Splunks
c6cad5f702 Removed unused webhooks import 2024-04-16 08:52:22 +00:00
Sam Splunks
c0ee8e0847 Use update_ticket mechanism in email.py 2024-04-16 08:49:11 +00:00
Timothy Hobbs
e708281dcd Implement webhooks. Fixes #264 2023-12-02 20:57:21 +00:00
Christopher Broderick
e4da2797b9 Fix missing f-string operator.
Add queue name to info log.
2023-10-26 21:31:53 +01:00
Christopher Broderick
e040bcac77 Add missing capture of exception to variable. 2023-10-25 17:15:45 +01:00
Christopher Broderick
bc7e189a5c Remove check for info being enabled 2023-10-24 14:24:10 +01:00
Christopher Broderick
2c9e251113 Fix order of imports 2023-10-24 14:20:09 +01:00
Christopher Broderick
a7863b5f27 Fix formatting 2023-10-24 14:08:40 +01:00
Christopher Broderick
8849943d33 Add logging to stdout when enabled to facilitate debugging issues. 2023-10-24 13:50:23 +01:00
Timothy Hobbs
405efcc33b Delete emails immediately to prevent duplicate ticket problems
Right now if there is an exception in this loop due to a single messed up
email (perhapse an invalid email address), the loop will fail without deleting
the already processed emails. In a few hours you can end up with hundreds of
duplicate tickets. This way, the already processed emails will be deleted and
not processed again.
2023-10-14 18:48:02 +02:00
Christopher Broderick
e90739a07a Fix formatting issues 2023-10-10 14:08:57 +01:00
Christopher Broderick
8006826ddf Process email content first then focus on attachments.
Use the EmailMessage class for enhanced processing.
2023-10-10 13:41:28 +01:00
Christopher Broderick
9bbe1945b0 Fix format errors 2023-07-23 06:31:29 +01:00
Christopher Broderick
2e5697c11a Completely rework the email parsing.
Fixes a number of hacks that have accumulated and makes it is more
easily understood and easier to enhance in the future.
2023-07-23 06:12:32 +01:00
Christopher Broderick
707cc6761b Implement a recursive multipart parser to cater for attachments that
have embedded attachments.
2023-07-16 14:55:18 +01:00
bruce.gibbins
c23c8e5be6 Add user defined IMAP Debug Level and improved exception message 2023-04-19 20:07:43 +10:00
bruce.gibbins
a8fbeaa140 Fix OAuth tests 2023-04-19 15:22:35 +10:00
bruce.gibbins
012cc7041a Fix OAuth tests 2023-04-19 15:12:13 +10:00
bruce.gibbins
101326c987 Use settings instead of django_settings 2023-04-17 20:08:56 +10:00
bruce.gibbins
c29996df94 Resorted imports for pep8 2023-04-17 13:15:47 +10:00
bruce.gibbins
9192779889 Add IMAP OAUTH Mail Box Type 2023-04-15 22:11:41 +10:00
bruce.gibbins
d7ebc8e1c2 Revert "Add IMAP OAUTH Mail Box Type"
This reverts commit d57f11f40a.
2023-04-15 21:56:05 +10:00
bruce.gibbins
d57f11f40a Add IMAP OAUTH Mail Box Type 2023-04-15 21:52:44 +10:00
Bruce
287024acd1 Use updated_submitter email template in send for updated ticket 2023-03-28 19:45:54 +10:00
Christopher Broderick
8cb3d43311 Use simpler conversion to string 2023-03-25 13:25:22 +00:00
Christopher Broderick
4cd66d7e0c Fix import format fail 2023-03-25 13:21:38 +00:00
Christopher Broderick
cdbd531931 Ensure multipart attachments are saved 2023-03-25 13:06:03 +00:00
Christopher Broderick
7f8e996668 Fix missing param in call 2023-03-10 22:11:34 +00:00
Christopher Broderick
aad73a5d90 Fix format errors 2023-03-10 22:06:14 +00:00
Benbb96
b3edba3fc5 Fix #1054 2022-10-09 23:05:16 +02:00
chrisbroderick
9e3a3abcf1 Fix import sorting 2022-09-08 23:40:49 +01:00
chrisbroderick
8d7ba415fa Fix formatting per flake8 2022-09-08 22:11:24 +01:00
chrisbroderick
eca2255f56 Test for filename using diaretics 2022-09-08 10:05:09 +01:00
chrisbroderick
572ffd5acf Handle ignored emails explicitly using exceptions.
Support the flag on IgnoreEmail model to control deleting the email if
ignored.
2022-09-06 19:40:35 +01:00
chrisbroderick
23c3b72a43 Refactor object_from_message to make it more testable and fix some bugs.
Extract the from email using the email library instead of pre-decoding
which exposes the comma separator causing the email address to be
extracted incorrectly if the real name contains a comma.
Raise an exception when a message to be ignored is detected to process
ignored messages explicitly.
2022-09-04 22:01:32 +01:00
Martin Whitehouse
46f8e9d21f
Clear error
Use.objects.get causes undefined variable when using get_user_model
2022-07-25 03:52:58 +02:00
Martin Whitehouse
1468982043
Remove unused variables, extract correct index 2022-07-25 03:50:49 +02:00
Martin Whitehouse
57cd2f1471
Remove annoation for py3.8 2022-07-25 03:47:57 +02:00
Martin Whitehouse
8d63d65a7d
Removed encoding to 'utf-8', breaks tests.
This needs to be looked into further.
2022-07-25 02:41:40 +02:00
Martin Whitehouse
4e2b7deefb
Reduces complexity of object_from_message
Helper functions created to help break up the flow
2022-07-25 02:22:32 +02:00
Martin Whitehouse
a5e74d6449
Extract getting ticket_id from subject to helper function 2022-07-25 01:56:13 +02:00
Martin Whitehouse
283f052c0e
Annotate function signature 2022-07-25 01:47:00 +02:00
Martin Whitehouse
80f4152301
Simplify return statement
Rename `ticket` to `ticket_id` for clarity
2022-07-25 01:43:43 +02:00
Martin Whitehouse
0b1de1eead
Removed unused import
Result of previous code removal
2022-07-25 01:23:12 +02:00
Martin Whitehouse
fe28c2f540
Merge branch 'unstable' of git@github.com:martin-marty/django-helpdesk.git into 1039-complexity-reduction 2022-07-25 01:22:11 +02:00
Martin Whitehouse
1ac78955c0
Removed notifications_to_be_sent list
The whole loop appeared to be doing nothing other than appending email
addresses to a list, which was never used.
2022-07-25 01:22:05 +02:00
Martin Whitehouse
0f0b0a5995
Remove left over 'cc' code 2022-07-22 16:27:38 +02:00
Martin Whitehouse
25542f929e
Initial isort configuration
Will fail build if imports are not sorted correctly
2022-07-22 03:26:41 +02:00
Martin Whitehouse
aa876f8016
pycodestyle formatting 2022-07-12 12:34:19 +02:00