Class: PuavoRest::Mailer

Inherits:
Object
  • Object
show all
Defined in:
lib/mailer.rb

Instance Method Summary (collapse)

Constructor Details

- (Mailer) initialize

Returns a new instance of Mailer



7
8
9
10
11
12
13
# File 'lib/mailer.rb', line 7

def initialize
  if CONFIG["password_management"]
    @options = { :via => :smtp }
    @options.merge!(CONFIG["password_management"]["smtp"])
    @options.recursive_symbolize_keys!
  end
end

Instance Method Details

- (Object) options



20
21
22
# File 'lib/mailer.rb', line 20

def options
  @options
end

- (Object) send(args)



15
16
17
18
# File 'lib/mailer.rb', line 15

def send(args)
  email_options = args.merge(@options)
  Pony.mail(email_options)
end