Class: ArMailerAWS::Mailer
- Inherits:
-
Object
- Object
- ArMailerAWS::Mailer
- Defined in:
- lib/ar_mailer_aws/mailer.rb
Instance Attribute Summary collapse
-
#email_class ⇒ Object
Returns the value of attribute email_class.
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(options = {}) ⇒ Mailer
constructor
A new instance of Mailer.
Constructor Details
#initialize(options = {}) ⇒ Mailer
Returns a new instance of Mailer.
6 7 8 |
# File 'lib/ar_mailer_aws/mailer.rb', line 6 def initialize(={}) self.email_class = [:email_class] || ArMailerAWS.email_class.constantize end |
Instance Attribute Details
#email_class ⇒ Object
Returns the value of attribute email_class.
4 5 6 |
# File 'lib/ar_mailer_aws/mailer.rb', line 4 def email_class @email_class end |
Instance Method Details
#deliver!(mail) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ar_mailer_aws/mailer.rb', line 10 def deliver!(mail) envelope_from, destinations, = check_params(mail) destinations.each do |destination| self.email_class.create! mail: , to: destination, from: envelope_from end end |