Advertisement
Guest User

Untitled

a guest
Aug 16th, 2013
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. ActionMailer::Base.delivery_method = :smtp
  2.  
  3. ActionMailer::Base.smtp_settings = {
  4. :address => "smtp.gmail.com",
  5. :port => "587",
  6. :domain => "gmail.com",
  7. :user_name => "xxx@gmail.com",
  8. :password => "yyy",
  9. :authentication => "plain",
  10. :enable_starttls_auto => true
  11. }
  12.  
  13. config.action_mailer.raise_delivery_errors = true
  14.  
  15. if Rails.env != 'test'
  16. email_settings = YAML::load(File.open("#{Rails.root.to_s}/config/email.yml"))
  17. ActionMailer::Base.smtp_settings = email_settings[Rails.env] unless email_settings[Rails.env].nil?
  18. end
  19.  
  20. development:
  21. :address: smtp.gmail.com
  22. :port: 587
  23. :authentication: plain
  24. :user_name: xxx
  25. :password: yyy
  26. :enable_starttls_auto: true
  27. production:
  28. :address: smtp.gmail.com
  29. :port: 587
  30. :authentication: plain
  31. :user_name: xxx
  32. :password: yyy
  33. :enable_starttls_auto: true
  34.  
  35. config.action_mailer.raise_delivery_errors = true
  36. config.action_mailer.perform_deliveries = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement