action_mailer.rb 684 B

12345678910111213141516
  1. # Read smtp config out of a config/smtp.yml file
  2. smtp_config = YAML::load(ERB.new(File.read(Rails.root.join('config', 'smtp.yml'))).result)
  3. if smtp_config.keys.include? Rails.env
  4. Huginn::Application.config.action_mailer.smtp_settings = smtp_config[Rails.env].symbolize_keys
  5. end
  6. # Huginn::Application.config.action_mailer.smtp_settings = {
  7. # address: ENV['SMTP_SERVER'] || 'smtp.gmail.com',
  8. # port: ENV['SMTP_PORT'] || 587,
  9. # domain: ENV['SMTP_DOMAIN'],
  10. # authentication: ENV['SMTP_AUTHENTICATION'] || 'plain',
  11. # enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true' ? true : false,
  12. # user_name: ENV['SMTP_USER_NAME'],
  13. # password: ENV['SMTP_PASSWORD']
  14. # }