Sha256: baa95b09bb47e928ec939b6ad653686745b36ef04a0c83b6413bcbc9b3c2c625

Contents?: true

Size: 689 Bytes

Versions: 1

Compression:

Stored size: 689 Bytes

Contents

class UserMailer < ActionMailer::Base
  default :from => "info@itjob.fm"

  sendgrid_header do
    category "itjob"

    filters {
      opentrack "enable" => 1
      clicktrack "enable" => 1
      subscriptiontrack "enable" => 0
      template "enable" => 0
      footer "enable" => 0
    }
  end

  def notify(to = "hlxwell@gmail.com")
    @username = "Michael He"

    # html must below text
    mail :to => to, :subject => "subject in mailer" do |f|
      f.html
      f.text
    end
  end

  def notify_to_user(user)
    @firstname = user.firstname
    @lastname = user.lastname

    # html must below text
    mail :to => user.email do |f|
      f.html
      f.text
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mail_engine-0.1.4 test/dummy/app/mailers/user_mailer.rb