diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-04-25 13:09:04 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-04-25 13:09:04 +0100 |
commit | cde99c668fc99e67c8c4db10fff161b4dd4b2530 (patch) | |
tree | 39437e80e4664f267cefb0272f6861a2bdfdb7e2 /lib | |
parent | 078a7fc07b9bc0e80510d82873ec2541e8c539bb (diff) |
Correct the body of emails on raise()/clear().
Credit to reddit user knothead for spotting this bug.
Fixes #4386.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/custodian/alerts/smtp.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/custodian/alerts/smtp.rb b/lib/custodian/alerts/smtp.rb index d170bbf..4de6fbe 100644 --- a/lib/custodian/alerts/smtp.rb +++ b/lib/custodian/alerts/smtp.rb @@ -30,8 +30,8 @@ module Custodian # Raise an alert by email. # def raise - subject = "#{test.target} failed #{test.get_type}-test - #{test.error()}" - body = "The alert has cleared\nRegards\n"; + subject = "#{test.target} alert #{test.get_type}-test - #{test.error()}" + body = "The alert has raised, with the following details:\n#{test.error()}\nRegards\n"; _send_mail( @target, subject, body ) end @@ -42,8 +42,8 @@ module Custodian # Clear an alert by email. # def clear - subject = "#{test.target} failed #{test.get_type}-test" - body = "The alert has raised, with the following details:\n#{test.error()}\nRegards\n"; + subject = "#{test.target} cleared #{test.get_type}-test" + body = "The alert has cleared\nRegards\n"; _send_mail( @target, subject, body ) end |