Commit 4d09c6e9 by Tu Nombre

Anti mamadas por exeso de mail

1 parent 99716152
...@@ -47,7 +47,8 @@ class StateMail(): ...@@ -47,7 +47,8 @@ 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:
self.SMTPcliente(User, Pass, Port, Host) self.SMTPcliente(User, Pass, Port, Host)
......
...@@ -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:
self.Envio(msg,info,stadomail) if not msg['From'] in stadomail.MailRompedor:
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!