class PatrolMailer

Public Instance Methods

report(content) click to toggle source
# File lib/patrol_mailer.rb, line 7
def report(content)
  @content = content

  hdr = SmtpApiHeader.new()
  hdr.setCategory("initial")
  hdr.addFilterSetting("subscriptiontrack", "enable", 0)
  headers["X-SMTPAPI"] = hdr.asJSON
  timestamp = Time.now.strftime("%Y-%m-%d %H:%M")

  mail(:to => "bc@billetto.dk", :subject => "Patrol report (#{timestamp})") do |format|
    format.html { render :text => content }
    format.text { render :text => content }
  end
end