This project is archived and is in readonly mode.
Make ActionMailer delivery_method plugin-able
Reported by MatthewRudy | October 27th, 2009 @ 09:42 PM | in 3.0.2
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 implementationsif 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.
Comments and changes to this ticket
-
José Valim October 27th, 2009 @ 10:04 PM
- Milestone cleared.
Great idea! Could you please provide both commits in one patch?
-
MatthewRudy October 28th, 2009 @ 09:22 AM
ok I squashed that branch into a new branch
http://github.com/matthewrudy/rude-rails/tree/separate-actionmailer...here's the squashed commit
http://github.com/matthewrudy/rude-rails/commit/231cbb7da8a995594ea...else I've attached a .patch as well.
-
José Valim October 28th, 2009 @ 10:54 AM
- State changed from new to open
Thanks! Just applied it on a branch where I'm refactoring ActionMailer. It should be merged soon!
-
MatthewRudy October 28th, 2009 @ 11:32 AM
cheers Jose.
I'm watching your am branch,
will see what other changes I can think of.Take care.
MatthewRudy
-
José Valim November 1st, 2009 @ 12:16 PM
- State changed from open to resolved
Matthew, my branch was merged! Thanks for your work!
http://github.com/rails/rails/commit/f4f76772fb5c25357a54baaa9cd20f...
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>