Class: AppMail::Rails::ActionMailerDeliveryMethod
- Inherits:
-
Object
- Object
- AppMail::Rails::ActionMailerDeliveryMethod
- Defined in:
- lib/app_mail/rails/action_mailer_delivery_method.rb
Instance Method Summary collapse
- #deliver!(message) ⇒ Object
-
#initialize(settings) ⇒ ActionMailerDeliveryMethod
constructor
A new instance of ActionMailerDeliveryMethod.
- #settings ⇒ Object
Constructor Details
#initialize(settings) ⇒ ActionMailerDeliveryMethod
Returns a new instance of ActionMailerDeliveryMethod.
5 6 7 |
# File 'lib/app_mail/rails/action_mailer_delivery_method.rb', line 5 def initialize(settings) @settings = settings end |
Instance Method Details
#deliver!(message) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/app_mail/rails/action_mailer_delivery_method.rb', line 13 def deliver!() client. do |m| m.mail_from(.from.first) [.to, .cc, .bcc].flatten.compact.uniq.each do |address| m.rcpt_to(address) end m.data(.to_s) end end |
#settings ⇒ Object
9 10 11 |
# File 'lib/app_mail/rails/action_mailer_delivery_method.rb', line 9 def settings @settings end |