dynamically changing ActionMailer::Base.delivery_method
I need some of my emails to go using "smtp" and some others using "sendmail". Is there a clean way to switch between delivery methods depending on the mailer method?
You just need to define it with his configuration
ActionMailer::Base.delivery_method = :sendmail
And in other part of your app :
ActionMailer::Base.delivery_method = :smtp
精彩评论