Class: OpenMailer::DeliveryMethod

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ DeliveryMethod

Returns a new instance of DeliveryMethod.



8
9
10
# File 'lib/open_mailer/delivery_method.rb', line 8

def initialize(settings)
  self.settings = settings
end

Instance Attribute Details

#settingsObject

Returns the value of attribute settings.



6
7
8
# File 'lib/open_mailer/delivery_method.rb', line 6

def settings
  @settings
end

Instance Method Details

#deliver!(mail) ⇒ Object



12
13
14
15
16
# File 'lib/open_mailer/delivery_method.rb', line 12

def deliver!(mail)
  Mail::CheckDeliveryParams.check mail
  file = Tempfile.open(['', '.eml']) { |file| file << mail }
  Launchy.open file.path
end