Advertisement
Guest User

Untitled

a guest
Apr 16th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. require File.expand_path('../boot', __FILE__)
  2. require 'rails/all'
  3. Bundler.require(*Rails.groups)
  4. module ChrisPelnarDotCom
  5. class Application < Rails::Application
  6. config.active_record.raise_in_transactional_callbacks = true
  7. config.action_mailer.delivery_method = :smtp
  8. config.action_mailer.smtp_settings = {
  9. address: 'smtp.gmail.com',
  10. port: 587,
  11. domain: 'gmail.com',
  12. user_name: ENV["gmail_username"],
  13. password: ENV["gmail_password"],
  14. authentication: 'plain',
  15. enable_starttls_auto: true }
  16. end
  17. end
  18.  
  19. ActionMailer::Base.smtp_settings = {
  20. :address => "smtp.gmail.com",
  21. :port => 587,
  22. :domain => 'www.yourdomain.com',
  23. :user_name => ENV["gmail_username"],
  24. :password => ENV["gmail_password"],
  25. :authentication => 'plain',
  26. :enable_starttls_auto => true
  27. }
  28.  
  29. ActionMailer::Base.default_url_options[:host] = ENV["gmail_username"]
  30.  
  31. gmail_username: "my_email@gmail.com"
  32. gmail_password: "my_password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement