Sha256: d61a8f40b26d69eb3713b0025cee139bd0ce4406a399c92b65a78dda095b9e6e
Contents?: true
Size: 793 Bytes
Versions: 1
Compression:
Stored size: 793 Bytes
Contents
## # Adds sending email through an ActiveRecord table as a delivery method for # ActionMailer. # class ActionMailer::Base ## # Set the email class for deliveries. Handle class reloading issues which prevents caching the email class. # @@email_class_name = 'Email' def self.email_class=(klass) @@email_class_name = klass.to_s end def self.email_class @@email_class_name.constantize end ## # Adds +mail+ to the Email table. Only the first From address for +mail+ is # used. def perform_delivery_activerecord(mail) sender = (mail['return-path'] && mail['return-path'].spec) || mail['from'].to_s mail.destinations.each do |destination| self.class.email_class.create :mail => mail.encoded, :to => destination, :from => sender end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
catalogchoice-ar_mailer-2.1.7 | lib/action_mailer/ar_mailer.rb |