So I have action_mailer_optional_tls (http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls) and this in my enviroment.rb
ActionMailer::Base.server_settings = {
:tls => true,
:address => "smtp.gmail.com",
:port => "587",
:domain => "www.somedomain.com",
:authentication => :plain,
:user_name => "someusername",
:password => "somepassword"
}
But now what If I want to send emails from different email accounts? How do I override the user_name and password fields on the fly?
What Im looking for is a solution which allows dynamic switching between accounts. Example the following scenario: 10 "Admins" can send out notices to our customers. Each has their own gmail account, when they fill out a form on the site rails connects using their account and sends the mail.
Thanks in advance!
Ali