Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Make ActionMailer delivery_method plugin-able

#3433

currently we have the following syntax

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings   = {
  :domain => 'somedomain',
  :address            => "mail",
  :port               => 25,
  :perform_deliveries => true
}
but I propose we should be able to do the following
config.action_mailer.delivery_method = MyCustomerDeliveryMethod.new
attached is a patch that makes ActionMailer::DeliveryMethod which is a namespace for a collection of implementations
if done right it will be easy to deprecate all these different "smtp_settings", and "file_settings" and such
and replace it with the following consistent syntax
config.action_mailer.delivery_method = :smtp, {:some => "options"}
and
MyMailerClass.delivery_method.settings = {:some => "overrided options"}

the second half is not included in the patch,
but would be simple for me to implement,
if you thought it was a good idea.

Reported by MatthewRudy · October 27th, 2009 @ 09:42 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: none

Activity

  1. MatthewRudy
  2. MatthewRudy
  3. José Valim
    José Valim
    • Milestone cleared.

    Great idea! Could you please provide both commits in one patch?

    October 27th, 2009 @ 10:04 PM

  4. MatthewRudy
  5. José Valim
    José Valim
    • State changed from new to open

    Thanks! Just applied it on a branch where I'm refactoring ActionMailer. It should be merged soon!

    October 28th, 2009 @ 10:54 AM

  6. MatthewRudy
    MatthewRudy

    cheers Jose.

    I'm watching your am branch,
    will see what other changes I can think of.

    Take care.

    MatthewRudy

    October 28th, 2009 @ 11:32 AM

  7. José Valim
    José Valim
    • State changed from open to resolved

    Matthew, my branch was merged! Thanks for your work!

    http://github.com/rails/rails/commit/f4f76772fb5c25357a54baaa9cd20f...

    November 1st, 2009 @ 12:16 PM

  8. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to

    October 15th, 2010 @ 11:01 PM