Method: Mailit::Mail#initialize

Defined in:
lib/mailit/mail.rb

#initialize(options = {}) ⇒ Mail

Create an instance of Mailit::Mailer.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :to (String)
  • :from (String)
  • :subject (String)
  • :text (String)
  • :html (String)

Author:

  • manveru



93
94
95
96
97
98
99
100
101
102
# File 'lib/mailit/mail.rb', line 93

def initialize(options = {})
  @headers = []
  @attachments = []
  @attachment_boundary = self.class.generate_boundary
  @body_boundary = self.class.generate_boundary
  @charset = 'utf-8'
  @html = @text = nil

  options.each{|key, value| __send__("#{key}=", value) }
end