Class: Auth::SendMail

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

Instance Method Summary collapse

Instance Method Details

#send_email(opts) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'app/mailers/auth/send_mail.rb', line 3

def send_email(opts)
  @options = opts || {}
  raise "no recipient address" unless @options[:to]
  raise "no subject" unless @options[:to]
  
  mail(to: @options[:to], subject: @options[:subject]) do |format|
    format.html { render @options[:template] || "send"  }
  end  
end