Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2015 19:08
Show Gist options
  • Save anonymous/b6ae57a4c5036210b693 to your computer and use it in GitHub Desktop.
Save anonymous/b6ae57a4c5036210b693 to your computer and use it in GitHub Desktop.
class Email
attr_accessor :is_set, :alertname, :from, :to, :subject, :priority, :include_trigger, :include_trigger_time, :reportServerEnabled, :inline, :sendresults, :useNSSubject
def initialize (is_set : "1", alertname, from, to : "no-reply@email", priority : "2", include_trigger : "1", include_trigger_time = "1", reportServerEnabled = "0", inline : "1", sendresults : "1", useNSSubject : "1")
@is_set = is_set
@alertname = alertname
@from = "\" " + alertname + " \"" + from
@to = to
@subject = alertname
@priority = priority
@include_trigger = include_trigger
@include_trigger_time = include_trigger_time
@reportServerEnabled = reportServerEnabled
@inline = inline
@sendresults = sendresults
@useNSSubject = useNSSubject
end
def print
puts "action.email = " + @is_set
puts "action.email.from = " + @from
puts "action.email.to = " + @to
puts "action.email.subject = " + @subject
puts "action.email.priority = " + @priority
puts "action.email.include.trigger = " + @include_trigger
puts "action.email.include.trigger.time = " + @include_trigger_time
puts "action.email.reportServerEnabled = " + @reportServerEnabled
puts "action.email.inline = " + @inline
puts "action.email.sendresults = " + @inline
puts "action.email.useNSSubject = " + @sendresults
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment