Class: ReminderMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/reminder_mailer.rb

Instance Method Summary collapse

Instance Method Details

#email(options = {}) ⇒ Object

Send email reminder.

Attributes

  • options - Hash containing the following options:

Options

  • :to - Email recipients like “[email protected]”.

  • :subject - Subject of the email like “Friendly reminder”.

  • :message - Message preceding the urls “Please update the following urls:”.

  • :urls - Hash containing details about the urls to include like “=> url_label_1, url_2 => url_label_2”.



18
19
20
21
22
23
24
25
26
27
# File 'app/mailers/reminder_mailer.rb', line 18

def email(options = {})
  @to = options[:to]
  @message = options[:message]
  @urls = options[:urls]

  mail(:to => @to,
       :cc => options[:cc],
       :subject => options[:subject],
       :date => Time.now)
end