This project is archived and is in readonly mode.

#3433 ✓resolved
MatthewRudy

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 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.

Comments and changes to this ticket

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>

People watching this ticket

Pages