Permalink
Browse files

Merge pull request #16 from medecau/master

email was being sent to the account of the watchdog
  • Loading branch information...
2 parents 7e5984a + cc07442 commit 713c098e44974cad50eda77800687a66ca7acf30 @sebastien committed Jan 22, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 Sources/watchdog.py
View
@@ -894,7 +894,6 @@ def run(self, monitor, service, rule, runner):
Logger.Info("Email sent to %s (#%s)" % (self.recipient, monitor.iteration))
else:
Logger.Err("Could not send email to %s (#%s)" % (self.recipient, monitor.iteration))
-
def send(self, monitor=None, service=None, rule=None, runner=None):
server = smtplib.SMTP(self.host)
origin = self.origin or "<Watchdog for %s> watchdog@%s" % (service and service.name, popen("hostname")[:-1])
@@ -912,7 +911,7 @@ def send(self, monitor=None, service=None, rule=None, runner=None):
server.ehlo()
if self.password:
server.login(self.user, self.password)
- server.sendmail(origin, [self.user], message)
+ server.sendmail(origin, self.recipient, message)
try:
server.quit()
except:

0 comments on commit 713c098

Please sign in to comment.