action_mailer.rb 687 B

12345678910111213
  1. ActionMailer::Base.smtp_settings = {
  2. address: ENV['SMTP_SERVER'] || "smtp.gmail.com",
  3. port: ENV['SMTP_PORT'] || 587,
  4. domain: ENV['SMTP_DOMAIN'],
  5. authentication: ENV['SMTP_AUTHENTICATION'] == 'none' ? nil : ENV['SMTP_AUTHENTICATION'] || "plain",
  6. enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true',
  7. ssl: ENV['SMTP_SSL'] == 'true',
  8. user_name: ENV['SMTP_USER_NAME'] == 'none' ? nil : ENV['SMTP_USER_NAME'].presence,
  9. password: ENV['SMTP_USER_NAME'] == 'none' ? nil : ENV['SMTP_PASSWORD'].presence,
  10. openssl_verify_mode: ENV['SMTP_OPENSSL_VERIFY_MODE'].presence,
  11. ca_path: ENV['SMTP_OPENSSL_CA_PATH'].presence,
  12. ca_file: ENV['SMTP_OPENSSL_CA_FILE'].presence
  13. }