Commit 4d09c6e9 by Tu Nombre

Anti mamadas por exeso de mail

1 parent 99716152
...@@ -47,6 +47,7 @@ class StateMail(): ...@@ -47,6 +47,7 @@ class StateMail():
def __init__(self): def __init__(self):
self.Consultas = {}#{MailUSer-pass-host-str(port):{"hora": datetime.datetime.now, "estado": self.chequear_stado_WB(telefono)},} self.Consultas = {}#{MailUSer-pass-host-str(port):{"hora": datetime.datetime.now, "estado": self.chequear_stado_WB(telefono)},}
self.MailRompedor = []
def chequear_stado_Server(self, User, Pass, Port, Host): def chequear_stado_Server(self, User, Pass, Port, Host):
try: try:
......
...@@ -147,10 +147,13 @@ class Mail(ServiceBase): ...@@ -147,10 +147,13 @@ class Mail(ServiceBase):
succ[file] = True succ[file] = True
#self.s.send_message(msg) #self.s.send_message(msg)
try: try:
if not msg['From'] in stadomail.MailRompedor:
self.Envio(msg,info,stadomail) self.Envio(msg,info,stadomail)
except: except:
print("ROMPIO ALGO EN EL ENVIO") print("ROMPIO ALGO EN EL ENVIO")
stadomail.MailRompedor.append(msg['From'])
succ[file] = False succ[file] = False
stadomail.MailRompedor = []
return succ return succ
def Usuario(self, info): def Usuario(self, info):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!