Sha256: 100744062720ae6c7454d95cc11d130002050ac3b7130a1d0f876855b6b66d25
Contents?: true
Size: 823 Bytes
Versions: 2
Compression:
Stored size: 823 Bytes
Contents
class UserMailer < ActionMailer::Base default :from => MailEngine::Base.current_config["default_from"] sendgrid_header do category MailEngine::Base.current_config["sendgrid"]["category_name"] 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mail_engine-0.1.10 | test/dummy/app/mailers/user_mailer.rb |
mail_engine-0.1.9 | test/dummy/app/mailers/user_mailer.rb |