Skip to content

Instantly share code, notes, and snippets.

@tinomen
Created September 8, 2011 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tinomen/1202718 to your computer and use it in GitHub Desktop.
Save tinomen/1202718 to your computer and use it in GitHub Desktop.
basic mail smtp setup
# in enviornment.rb
config.after_initialize do
Mail.defaults do
delivery_method :smtp, { :address => "smtp.gmail.com",
:port => 587,
:domain => 'domain.com',
:from => 'no-reply@domain.com',
:user_name => 'no-reply@domain.com',
:password => 'secret',
:authentication => :login,
:enable_starttls_auto => true
}
end
end
# override in enviornments/test.rb
# delivery_metod :test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment