diff --git a/README.rst b/README.rst index f094f27b..4e7f3dbf 100644 --- a/README.rst +++ b/README.rst @@ -25,12 +25,13 @@ LICENSE.3RDPARTY for license terms for included packages. Dependencies (pre-flight checklist) ----------------------------------- -1. Python 2.5+ +1. Python 2.6+ 2. Django (1.4 or newer) 3. South for database migrations (highly recommended, but not required). Download from http://south.aeracode.org/ 4. An existing WORKING Django project with database etc. If you cannot log into the Admin, you won't get this product working. 5. `pip install django-bootstrap-form` and add `bootstrapform` to `settings.INSTALLED_APPS` +6. `pip install email-reply-parser` to get smart email reply handling **NOTE REGARDING SQLITE AND SEARCHING:** If you use sqlite as your database, the search function will not work as diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index e3893711..8d4fede6 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -21,6 +21,8 @@ from email.header import decode_header from email.Utils import parseaddr, collapse_rfc2231_value from optparse import make_option +from email_reply_parser import EmailReplyParser + from django.core.files.base import ContentFile from django.core.management.base import BaseCommand from django.db.models import Q @@ -192,7 +194,7 @@ def ticket_from_message(message, queue, quiet): if part.get_content_maintype() == 'text' and name == None: if part.get_content_subtype() == 'plain': - body_plain = decodeUnknown(part.get_content_charset(), part.get_payload(decode=True)) + body_plain = EmailReplyParser.parse_reply(decodeUnknown(part.get_content_charset(), part.get_payload(decode=True))) else: body_html = part.get_payload(decode=True) else: diff --git a/requirements.txt b/requirements.txt index 3a6519ca..0b809e40 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ Django>1.4 django-bootstrap-form +email-reply-parser