Created
October 19, 2010 09:06
-
-
Save bagwanpankaj/633886 to your computer and use it in GitHub Desktop.
Gmail SMTP Conf with Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
enable_starttls_auto: true | |
address: "smtp.gmail.com" | |
port: 587 | |
domain: 'http://' | |
authentication: plain | |
user_name: "user@domain_name" | |
password: your-password | |
production: | |
enable_starttls_auto: true | |
address: "smtp.gmail.com" | |
port: 587 | |
domain: 'http://' | |
authentication: plain | |
user_name: "user@domain_name" | |
password: your-password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load mail configuration if not in test environment | |
if RAILS_ENV != 'test' | |
email_settings = YAML::load(File.open("#{RAILS_ROOT}/config/mailer_settings.yml")) | |
ActionMailer::Base.smtp_settings = email_settings[RAILS_ENV] unless email_settings[RAILS_ENV].nil? | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install ambethia-smtp-tls | |
#make dependencies | |
#in "#{RAILS_ROOT}/config/environment.rb" write the following | |
config.gem "ambethia-smtp-tls", :lib => "smtp-tls", :source => "http://gems.github.com/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment