Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ActionMailer::Base.delivery_method = :smtp
- ActionMailer::Base.smtp_settings = {
- :address => "smtp.gmail.com",
- :port => "587",
- :domain => "gmail.com",
- :user_name => "xxx@gmail.com",
- :password => "yyy",
- :authentication => "plain",
- :enable_starttls_auto => true
- }
- config.action_mailer.raise_delivery_errors = true
- if Rails.env != 'test'
- email_settings = YAML::load(File.open("#{Rails.root.to_s}/config/email.yml"))
- ActionMailer::Base.smtp_settings = email_settings[Rails.env] unless email_settings[Rails.env].nil?
- end
- development:
- :address: smtp.gmail.com
- :port: 587
- :authentication: plain
- :user_name: xxx
- :password: yyy
- :enable_starttls_auto: true
- production:
- :address: smtp.gmail.com
- :port: 587
- :authentication: plain
- :user_name: xxx
- :password: yyy
- :enable_starttls_auto: true
- config.action_mailer.raise_delivery_errors = true
- config.action_mailer.perform_deliveries = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement