Sha256: 463ff8da765d301707796b5f5dce56d759a9179c9ce7580af43919488c7f31a2
Contents?: true
Size: 566 Bytes
Versions: 2
Compression:
Stored size: 566 Bytes
Contents
require "smtp_api_header" class PatrolMailer < ActionMailer::Base default :from => "from@example.com" 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
patrol-1.0.1 | lib/patrol_mailer.rb |
patrol-0.2.0 | lib/patrol_mailer.rb |