Sha256: df5b0dc12cfa9bb7161509055e74402acb3f4037b6d081db13c51486f04ca83b

Contents?: true

Size: 739 Bytes

Versions: 4

Compression:

Stored size: 739 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
    # should use subject in the db mail template.
    mail :to => to, :subject => "subject in mailer" do |f|
      f.text
      f.html
    end
  end

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mail_engine-0.1.8 test/dummy/app/mailers/user_mailer.rb
mail_engine-0.1.7 test/dummy/app/mailers/user_mailer.rb
mail_engine-0.1.6 test/dummy/app/mailers/user_mailer.rb
mail_engine-0.1.5 test/dummy/app/mailers/user_mailer.rb