amithasija 0 Light Poster

require 'action_mailer'

ActionMailer::Base.delivery_method = :smtp

ActionMailer::Base.server_settings = {
:address => "address",
:port => 25,
:domain => "domain.com",
:user_name => "myid@domain.com",
:password => "password",
:authentication => :login
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = "utf-8"


i have used the above code to send a mail in /config/enviourment.rb and its working fine ,now i want to change the settings dyanamically like if i send domain name and address from frontend it will change in the actionmailer and satrt working for that new address and domain.