From 5ff869e1bc641a33ca904094d05dfd648a333151 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Tue, 13 Mar 2018 18:16:41 +0100 Subject: [PATCH] [ENV] Add Mailjet conf --- .gitignore | 1 - config/initializers/mailjet.rb | 5 +++++ config/secrets.yml | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 config/initializers/mailjet.rb diff --git a/.gitignore b/.gitignore index d45eabf8e..a10657b94 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,6 @@ config/initializers/super_admin.rb doc/*.svg config/france_connect.yml config/github_secrets.yml -config/initializers/mailjet.rb config/fog_credentials.yml uploads/* coverage/**/* diff --git a/config/initializers/mailjet.rb b/config/initializers/mailjet.rb new file mode 100644 index 000000000..dafcb4084 --- /dev/null +++ b/config/initializers/mailjet.rb @@ -0,0 +1,5 @@ +Mailjet.configure do |config| + config.api_key = Rails.application.secrets.mailjet[:api_key] + config.secret_key = Rails.application.secrets.mailjet[:secret_key] + config.default_from = CONTACT_EMAIL +end diff --git a/config/secrets.yml b/config/secrets.yml index 1f308227c..9e57943f6 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -25,6 +25,9 @@ defaults: &defaults github: client_id: <%= ENV['GITHUB_CLIENT_ID'] %> client_secret: <%= ENV['GITHUB_CLIENT_SECRET'] %> + mailjet: + api_key: <%= ENV['MAILJET_API_KEY'] %> + secret_key: <%= ENV['MAILJET_SECRET_KEY'] %> development: <<: *defaults