Skip to content

Commit

Permalink
config email
Browse files Browse the repository at this point in the history
  • Loading branch information
sandroferraz committed Apr 1, 2015
1 parent b06c813 commit af87229
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

.env
Procfile

# Ignore bundler config.
/.bundle

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ end

group :development, :test do
gem 'sqlite3'
gem 'foreman', '~> 0.78.0'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ GEM
erubis (2.7.0)
excon (0.45.1)
execjs (2.4.0)
foreman (0.78.0)
thor (~> 0.19.1)
globalid (0.3.3)
activesupport (>= 4.1.0)
heroku (3.30.3)
Expand Down Expand Up @@ -187,6 +189,7 @@ DEPENDENCIES
byebug
coffee-rails (~> 4.1.0)
devise (~> 3.4.1)
foreman (~> 0.78.0)
heroku (~> 3.30.3)
jbuilder (~> 2.0)
jquery-rails
Expand Down
10 changes: 10 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,14 @@
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => "587",
:authentication => :plain,
:user_name => ENV['GMAIL_USERNAME'],
:password => ENV['GMAIL_PASSWORD'],
:domain => ENV['GMAIL_DOMAIN']
}
end
12 changes: 12 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,16 @@
config.active_record.dump_schema_after_migration = false

config.action_mailer.default_url_options = { host: 'http://blueberry-sundae-3964.herokuapp.com/' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default :charset => "utf-8"
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => "587",
:authentication => :plain,
:user_name => ENV['GMAIL_USERNAME'],
:password => ENV['GMAIL_PASSWORD'],
:domain => ENV['GMAIL_DOMAIN']
}
end
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
config.mailer_sender = 'sandro.ferraz.mei@gmail.com'

# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
Expand Down

0 comments on commit af87229

Please sign in to comment.