Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/microsoft_graph_mailer.rb')
-rw-r--r--config/initializers/microsoft_graph_mailer.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/microsoft_graph_mailer.rb b/config/initializers/microsoft_graph_mailer.rb
new file mode 100644
index 00000000000..45fdef1c57d
--- /dev/null
+++ b/config/initializers/microsoft_graph_mailer.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+if Gitlab.config.microsoft_graph_mailer.enabled
+ ActionMailer::Base.delivery_method = :microsoft_graph
+
+ ActionMailer::Base.microsoft_graph_settings = {
+ user_id: Gitlab.config.microsoft_graph_mailer.user_id,
+ tenant: Gitlab.config.microsoft_graph_mailer.tenant,
+ client_id: Gitlab.config.microsoft_graph_mailer.client_id,
+ client_secret: Gitlab.config.microsoft_graph_mailer.client_secret,
+ azure_ad_endpoint: Gitlab.config.microsoft_graph_mailer.azure_ad_endpoint,
+ graph_endpoint: Gitlab.config.microsoft_graph_mailer.graph_endpoint
+ }
+end