YAML Email Config

Based on: YAML Mail Config Plugin

  1. Install the plugin:
    script/plugin install
    svn://rubyforge.org/var/svn/slantwise/yaml_mail_config/trunk yaml_mail_config

  2. Remove the ActionMailer::Base.server_settings block in config/environment.rb.
  3. Add the file config/email.yml
    development:
      server: smtp.gmail.com
      port: 587
      domain: mycompany.com
      authentication: login
      username: username
      password: password
    production:
      server: smtp.gmail.com
      port: 587
      domain: mycompany.com
      authentication: login
      username: username
      password: password
    

Some examples have tls: true at the end of the production settings. I found that this caused problems in my Rails app. I did not bother to look for the reason, so I just removed it.