Module: Silverpop::ActionMailer

Defined in:
lib/silverpop/action_mailer.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(target) ⇒ Object

:nodoc:



11
12
13
# File 'lib/silverpop/action_mailer.rb', line 11

def self.included(target) # :nodoc:
  target.extend ClassMethods
end

Instance Method Details

#perform_delivery_silverpop(mail) ⇒ Object



5
6
7
8
9
# File 'lib/silverpop/action_mailer.rb', line 5

def perform_delivery_silverpop(mail)
  @mailer ||= Silverpop::Mailer.new(self.class.options)
  response = @mailer.mail(self.class.options[:campaign_id], mail, self.class.options)
  raise response.errors.first[:message] unless response.errors.empty?
end