I have a need to use two different smtp servers in a Rails application. It appears that the way ActionMailer is constructed, it is not possible to have different smtp_settin
When I wanted a quick test in the console (Rails 5) I did the following:
settings = { username: "" } # etc mailer = MyMailer.some_method mailer.delivery_method.settings.merge!(settings) mailer.deliver