fixes in header decoding in receiving support ticket email

This commit is contained in:
Anand Doshi 2012-07-31 10:56:24 +05:30
parent 3e7a143539
commit ccee92e5c0

View File

@ -70,9 +70,7 @@ class SupportMailbox(POP3Mailbox):
from webnotes.utils import decode_email_header
# replace double quotes with blank
# double quotes in header prohibit decoding of header
full_email_id = decode_email_header(mail.mail['From'].replace('"', ''))
full_email_id = decode_email_header(mail.mail['From'])
for thread_id in thread_list:
exists = webnotes.conn.sql("""\
@ -104,9 +102,7 @@ class SupportMailbox(POP3Mailbox):
d = Document('Support Ticket')
d.description = content
# replace double quotes with blank
# double quotes in header prohibit decoding of header
d.subject = decode_email_header(mail.mail['Subject'].replace('"', ''))
d.subject = decode_email_header(mail.mail['Subject'])
d.raised_by = full_email_id
d.content_type = content_type