Added debug log for sendmail

parent 205e858a
...@@ -12,7 +12,7 @@ sensor = sensori ...@@ -12,7 +12,7 @@ sensor = sensori
camera = telecamere camera = telecamere
window = finestre window = finestre
user = user user = user
none = Nessuna Sezione none = verifica_comandi_controlli
phone = telefono phone = telefono
index = Home index = Home
gate = cancelli gate = cancelli
......
...@@ -97,11 +97,12 @@ class DMEmail(object): ...@@ -97,11 +97,12 @@ class DMEmail(object):
def needTls(self, tls=True): def needTls(self, tls=True):
self.tls = tls self.tls = tls
def end(r): def end(self, r):
try: try:
self.reactor.disconnect() self.reactor.disconnect()
except: except:
pass pass
log.debug("Sendmail has returned "+str(r))
return 'OK' return 'OK'
def send(self, usemime=True): def send(self, usemime=True):
...@@ -132,7 +133,7 @@ class DMEmail(object): ...@@ -132,7 +133,7 @@ class DMEmail(object):
) )
self.reactor = reactor.connectTCP(self.server, self.port, senderFactory) self.reactor = reactor.connectTCP(self.server, self.port, senderFactory)
return d.addCallbacks(self.end) return d.addCallbacks(self.end, self.end)
def _realSendMime(ser, res, sval='internal'): def _realSendMime(ser, res, sval='internal'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment