trying to fix support ticket
This commit is contained in:
parent
2b60484bab
commit
a872d81983
@ -47,7 +47,7 @@ feed_dict = {
|
|||||||
# Support
|
# Support
|
||||||
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
||||||
'Maintenance Visit':['To %(customer_name)s', '#4169E1'],
|
'Maintenance Visit':['To %(customer_name)s', '#4169E1'],
|
||||||
'Support Ticket': ['[%(status)s] %(subject)s', '#000080'],
|
'Support Ticket': ["[%(status)s] %(subject)s", '#000080'],
|
||||||
|
|
||||||
# Website
|
# Website
|
||||||
'Web Page': ['%(title)s', '#000080'],
|
'Web Page': ['%(title)s', '#000080'],
|
||||||
|
@ -81,6 +81,7 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
st.make_response_record(content, mail.mail['From'], content_type)
|
st.make_response_record(content, mail.mail['From'], content_type)
|
||||||
webnotes.conn.set(st.doc, 'status', 'Open')
|
webnotes.conn.set(st.doc, 'status', 'Open')
|
||||||
update_feed(st.doc, 'on_update')
|
update_feed(st.doc, 'on_update')
|
||||||
|
webnotes.conn.commit()
|
||||||
# extract attachments
|
# extract attachments
|
||||||
self.save_attachments(st.doc, mail.attachments)
|
self.save_attachments(st.doc, mail.attachments)
|
||||||
return
|
return
|
||||||
@ -99,18 +100,19 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
d.naming_series = (opts and opts[0] and opts[0][0] and opts[0][0].split("\n")[0]) or 'SUP'
|
d.naming_series = (opts and opts[0] and opts[0][0] and opts[0][0].split("\n")[0]) or 'SUP'
|
||||||
try:
|
try:
|
||||||
d.save(1)
|
d.save(1)
|
||||||
|
except:
|
||||||
|
d.description = 'Unable to extract message'
|
||||||
|
d.save(1)
|
||||||
|
|
||||||
|
else:
|
||||||
# update feed
|
# update feed
|
||||||
update_feed(d, 'on_update')
|
update_feed(d, 'on_update')
|
||||||
|
|
||||||
# send auto reply
|
# send auto reply
|
||||||
self.send_auto_reply(d)
|
self.send_auto_reply(d)
|
||||||
|
|
||||||
except:
|
webnotes.conn.commit()
|
||||||
d.description = 'Unable to extract message'
|
|
||||||
d.save(1)
|
|
||||||
|
|
||||||
else:
|
|
||||||
# extract attachments
|
# extract attachments
|
||||||
self.save_attachments(d, mail.attachments)
|
self.save_attachments(d, mail.attachments)
|
||||||
|
|
||||||
@ -138,7 +140,7 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
"""
|
"""
|
||||||
Send auto reply to emails
|
Send auto reply to emails
|
||||||
"""
|
"""
|
||||||
signature = self.email_settings.support_signature
|
signature = self.email_settings.support_signature or ''
|
||||||
|
|
||||||
response = self.email_settings.support_autoreply or ("""
|
response = self.email_settings.support_autoreply or ("""
|
||||||
A new Ticket has been raised for your query. If you have any additional information, please
|
A new Ticket has been raised for your query. If you have any additional information, please
|
||||||
@ -148,7 +150,7 @@ We will get back to you as soon as possible
|
|||||||
|
|
||||||
[This is an automatic response]
|
[This is an automatic response]
|
||||||
|
|
||||||
""" + (signature or ''))
|
""" + signature)
|
||||||
|
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user