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