title: Change http_basic_authenticate_with credentials on fly, rails
body: <p>I need that user can change ActionMailer settings on fly, without server restarting. I'm tryin do that on my mailer class</p>
  
  <pre><code>class CustomerMailer &lt; ApplicationMailer
    self.smtp_settings = {
      address:             "smtp.gmail.com",
      port:                587,
      user_name:           settings[:delivery_email_login],
      password:            settings[:delivery_email_password],
      authentication:      "plain",
      enable_sarttls_auto: true
    }
  
    def customers_info_email(*some_args)
      # code
  end
  </code></pre>
  
  <p>end</p>
  
  <p>But changes take effect only after server restarting.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Thanks to Anthony L change smtp settings dynamically already solved, but i have another question. </p>
  
  <p><code>http_basic_authenticate_with name: login, password: password</code></p>
  
  <p>How dynamically change authentication credentials for this case?</p>