removed session timeout for getting emails
This commit is contained in:
parent
d015dfce92
commit
e38d783aff
@ -23,11 +23,7 @@ from core.doctype.communication.communication import make
|
|||||||
class JobsMailbox(POP3Mailbox):
|
class JobsMailbox(POP3Mailbox):
|
||||||
def setup(self, args=None):
|
def setup(self, args=None):
|
||||||
self.settings = args or webnotes.doc("Jobs Email Settings", "Jobs Email Settings")
|
self.settings = args or webnotes.doc("Jobs Email Settings", "Jobs Email Settings")
|
||||||
|
|
||||||
def check_mails(self):
|
|
||||||
return webnotes.conn.sql("select user from tabSessions where \
|
|
||||||
time_to_sec(timediff(now(), lastupdate)) < 1800")
|
|
||||||
|
|
||||||
def process_message(self, mail):
|
def process_message(self, mail):
|
||||||
if mail.from_email == self.settings.email_id:
|
if mail.from_email == self.settings.email_id:
|
||||||
return
|
return
|
||||||
|
@ -58,11 +58,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None, stat
|
|||||||
class SalesMailbox(POP3Mailbox):
|
class SalesMailbox(POP3Mailbox):
|
||||||
def setup(self, args=None):
|
def setup(self, args=None):
|
||||||
self.settings = args or webnotes.doc("Sales Email Settings", "Sales Email Settings")
|
self.settings = args or webnotes.doc("Sales Email Settings", "Sales Email Settings")
|
||||||
|
|
||||||
def check_mails(self):
|
|
||||||
return webnotes.conn.sql("select user from tabSessions where \
|
|
||||||
time_to_sec(timediff(now(), lastupdate)) < 1800")
|
|
||||||
|
|
||||||
def process_message(self, mail):
|
def process_message(self, mail):
|
||||||
if mail.from_email == self.settings.email_id:
|
if mail.from_email == self.settings.email_id:
|
||||||
return
|
return
|
||||||
|
@ -30,12 +30,7 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
"username": self.email_settings.support_username,
|
"username": self.email_settings.support_username,
|
||||||
"password": self.email_settings.support_password
|
"password": self.email_settings.support_password
|
||||||
})
|
})
|
||||||
|
|
||||||
def check_mails(self):
|
|
||||||
self.auto_close_tickets()
|
|
||||||
return webnotes.conn.sql("select user from tabSessions where \
|
|
||||||
time_to_sec(timediff(now(), lastupdate)) < 1800")
|
|
||||||
|
|
||||||
def process_message(self, mail):
|
def process_message(self, mail):
|
||||||
if mail.from_email == self.email_settings.fields.get('support_email'):
|
if mail.from_email == self.email_settings.fields.get('support_email'):
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user