jam-cloud/ruby/lib/jam_ruby/app/mailers/progress_mailer.rb

27 lines
733 B
Ruby
Raw Permalink Normal View History

2014-05-18 00:12:01 +00:00
module JamRuby
class ProgressMailer < ActionMailer::Base
include SendGrid
layout "user_mailer"
sendgrid_category :use_subject_lines
sendgrid_unique_args :env => Environment.mode
default :from => UserMailer::DEFAULT_SENDER
2014-05-19 15:12:59 +00:00
def send_reminder(batch_set)
user = batch_set.user
sendgrid_recipients([user.email])
sendgrid_substitute('@USERID', [user.id])
sendgrid_substitute(EmailBatchProgression::VAR_FIRST_NAME, [user.first_name])
mail(:to => user.email,
:subject => batch_set.subject,
:title => batch_set.title) do |format|
format.text { render batch_set.sub_type }
format.html { render batch_set.sub_type }
end
2014-05-18 00:12:01 +00:00
end
end
end