Commit Graph

60 Commits

Author SHA1 Message Date
Garret Wassermann
bc0125421b Fix PEP8 errors detected by new pycodestyle script 2017-12-06 02:06:07 -05:00
Will Stott
b99b55e426 Miscellaneous debug log additions. 2017-09-06 16:22:06 +01:00
Garret Wassermann
40ab600ad6 Merged in better handling of attachments, for #468 2017-08-30 15:18:22 -04:00
Garret Wassermann
04a3c3ff5a Update decodestring to decodebytes for Py3 since string name was deprecated in py3.1 2017-08-30 10:48:16 -04:00
msaelices
f931dd4dba Fix AttributeError while staff user does a mass update in some tickets using the Close (Send E-mail) action. 2017-08-21 01:26:45 +02:00
Garret Wassermann
f6c323c9ab Fix binary attachments to outgoing email, and handle case when it is plain text, to address #502 2017-07-17 05:04:25 -04:00
User
787c3aa4f5 make old subject_part pretty 2017-01-09 00:30:36 +01:00
User
b7baf2bf56 fix for error:BadHeaderError: Header values can't contain newlines when running get_email. caused by subject_part being repeated, but second time doesnt strip newlines 2017-01-08 18:52:24 +01:00
Pawel M
8f751691a4 whitespace removed 2016-12-16 10:38:15 +01:00
Pawel M
97b3444a92 if files condition restored 2016-12-16 10:36:00 +01:00
Pawel M
fc0ae58420 lib as reduxionist + read binary mode 2016-12-16 10:30:50 +01:00
Pawel M
df7920cd2e missing imports added 2016-12-14 00:04:38 +01:00
Pawel M
3a372fbcb4 White space removed 2016-12-13 23:40:36 +01:00
Pawel M
9939f62ebd Attachement should be readed in binary mode ... and attached as payload (regarding docs) 2016-12-13 23:28:16 +01:00
Pawel M
e7c4131ed7 Attachement should be readed in binary mode ... and attached as payload (regarding docs) 2016-12-13 22:43:14 +01:00
Jonathan Barratt
8dbd54ac16
stop corrupting binary attachments when delivering them by email
We accomplish this by attching files to out-bound mail diffrently
depending on the versino of Python in effect. In Py2 we can read
the files ourseles and the standard library will still
be able to use the text we pass as if it were bytes. Under Py3,
however, email.message will complain if it doesn't get to decode
the bytes itself, so instead of attaching the contents directly
 we just pass the path to the file as a string instead. Unfortunately,
Django 1.8 does not work with this Python 3 approach, due to its
 not yet having reverted to the newly improved standard library's
mail-message implementation, and thus requiring us to know more
about the character-encoding/mimetype of the attachment than I've
been able to gather cleanly by this point.
2016-12-13 19:41:13 +07:00
Jonathan Barratt
5acd891c68
refactor all handling of attached files
Extract attachment processing from forms, views.staff, and management.command.get_email modules, and consolidate it into a unified lib module function.
Also refactor the affected components, most notably lib.send_templated_email, to make it easier (IMO) to reason about changes to them.
Add unit tests for attachments with UTF-8 filenames, and functional tests for submission of same, as well as ASCII versions, through the public ticket-form.
Remove unused Attachment method "get_upload_to".
2016-12-08 19:47:20 +07:00
Jonathan Barratt
7738bba2ab
remove special-case imports for legacy versions
standardise use, or avoidance, of timezone, template from_string, and Context
2016-11-21 10:16:03 +07:00
Alex Barcelo
30e3aa55aa almost auto-fix on misc files 2016-10-23 22:09:17 +02:00
Alex Barcelo
24d88be8d9 Initial general clean-up of stuff 2016-10-21 17:14:12 +02:00
meomap
96f4fecb71 add setting for fallback locale 2016-10-14 15:04:28 +07:00
Matthias Hannig
a37f7145ec Serializing the query using JSON for SavedSearches unfortunately broke
Keyword-Searches.

Now, only the search string is serialized for saving and
the "qset" is moved from "other_filters" to apply_query.
2016-07-04 17:47:53 +02:00
Ross Poulton
11467f6e50 Properly check email context keys in newer Python versions. part of #362 2015-12-16 10:48:27 +11:00
Ross Poulton
6187b0568c Merge pull request #358 from flinz/django-1.9-fixes
Django 1.9 compatibility
2015-12-16 10:24:16 +11:00
Alex Seeholzer
2da16c511c updates to remove Django 1.10 deprecation warnings in Django 1.9:
- use of patterns() in urls.py is deprecated
- render() functions accept only dicts - introduced checks to ensure downward compatibility back to Django 1.7
2015-12-10 13:36:24 +01:00
Alex Seeholzer
8390125c01 fixes of python 3 test fails 2015-11-18 15:07:33 +01:00
Alex Seeholzer
71504aa85d minor changes for python3 2015-11-18 10:41:02 +01:00
Alex Seeholzer
27c519f2ee downwards compatibility for django < 1.8 2015-11-13 15:36:04 +01:00
Alex Seeholzer
cbea3c54f0 conformed template from_string method to use engines['django'] 2015-06-12 12:54:50 +02:00
Alex Seeholzer
0b7e0b7f04 changes in templating engine that worked for django 1.8 2015-06-12 12:52:35 +02:00
Alex Seeholzer
039653cc70 further fixes for Django 1.8.2 template engine 2015-06-12 12:52:34 +02:00
Jenny Qian
859935e5ee exclude '\r' from subject_part
This is to prevent BadHeaderError("Header values can't contain newlines..
2014-10-29 10:57:31 -05:00
Ross Poulton
4c901880bc Allow file attachments in storages other than local files (eg S3). Fixes GH-249. 2014-09-02 18:36:00 +10:00
Stefano Brentegani
76b9271c10 fix setting import (fixes CI error) 2014-07-20 16:17:39 +02:00
Issac Kelly
073df0b03e Continuation 2014-07-15 16:04:19 -07:00
Issac Kelly
19c1913268 Allow Templated Subjects. 2014-07-15 15:48:42 -07:00
Aaron C. de Bruyn
ae53c1f6c7 Strip out carriage returns from subjects. Coses GH-209 2014-06-17 12:01:33 -07:00
Ross Poulton
9ae358e6f8 Allow tests to run if Sites module isn't properly configured. 2012-08-08 14:31:51 +10:00
Stefano Brentegani
a520e380f0 fix ticket list (sorting and status querystring) 2012-05-11 17:15:46 +02:00
Ivan Giuliani
5eb8b6eeb7 Silly mistake: reversed condition in 'if' check 2012-01-18 23:36:58 +01:00
Ivan Giuliani
b6472507e4 apply_query shouldn't modify the parameters dictionary
Changing parameters in apply_query might yield an invalid state in later
code that assumes the query was not changed.
This patch avoids parameters modification and should fix the issue
reported in #109
2012-01-18 14:39:36 +01:00
Ross Poulton
533fdc8c2a Merge branch 'kotowicz-master', manually merging conflicts in these files:
helpdesk/lib.py
	helpdesk/templates/helpdesk/ticket_desc_table.html
	helpdesk/views/staff.py
2012-01-11 09:18:05 +00:00
Andreas Kotowicz
2d882a393c fix email problem with multiple addresses. 2011-12-09 17:21:48 +01:00
demo
049b75182b removed forgotten pdb 2011-11-28 18:53:01 +01:00
demo
b74f6914b2 handle the case when recipients is not str but unicode 2011-11-28 18:13:07 +01:00
Andreas Kotowicz
cb34b1933a make django-helpdesk more customizable + bug fixes:
- look at settings.py for all new options regarding customization.
- settings can be accessed inside the templates via the new
  templatetag 'load_helpdesk_settings'

- allow editing of personal followups, but only if followup does not
  contain any ticketchanges - otherwise this information is lost after
  the editing.
- add 'delete' link to attachments
- link to list of closed tickets in queue overview
- add 'closed & resolved' section to dashboard
- hide 'pre-set reply' box if no pre-set replies are found.
- use 'SelectDateWidget' for custom DateField

- fix how we update followups so that attachments don't get deleted
- fix bug where resolution emails contained the solution 'None'
- fix stats crashing bug
- fix locale bug
2011-11-19 09:34:07 +01:00
Alex Garel
7b594cfdc0 Added a warning if no message notification template found in database 2011-11-10 12:19:57 +01:00
Ross Poulton
2aaaf57504 Pull in changes from bclermont to fix content-type handling on queues when processing incoming e-mail. Closes GH-70. 2011-11-05 00:56:53 +00:00
maccesch
70a2cd9271 fixed email sending when no locale is specified in queue 2011-09-05 19:16:22 +02:00
maccesch
c4fa11719f fixed get_email management command 2011-09-05 18:42:41 +02:00