From 2b0811982e5c5e9580d5db2dc33f3c8a6e66d0ce Mon Sep 17 00:00:00 2001 From: Gavin Henry Date: Fri, 6 Dec 2024 22:13:44 +0000 Subject: [PATCH] Sort runtime config. --- config/runtime.exs | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 177cd1b2..6dad28fa 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -106,34 +106,11 @@ if config_env() == :prod do # # Check `Plug.SSL` for all available options in `force_ssl`. - # TODO: Switch Postmark to this when we get our first paid customer if config_env() == :prod or config_env() == :dev do ## Configuring the mailer - # - # See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details. - # In production you need to configure the mailer to use a different adapter. - # Also, you may need to configure the Swoosh API client of your choice if you - # are not using SMTP. Here is an example of the configuration: - # - # config :sentrypeer, Sentrypeer.Mailer, - # adapter: Swoosh.Adapters.Postmark, - # api_key: System.get_env("POSTMARK_API_KEY") - # - # - # For this example you need include a HTTP client required by Swoosh API client. - # Swoosh supports Hackney and Finch out of the box: - # - # config :swoosh, :api_client, Swoosh.ApiClient.Finch config :sentrypeer, Sentrypeer.Mailer, - adapter: Swoosh.Adapters.SMTP, - relay: System.get_env("SENTRYPEER_SMTP_RELAY"), - username: System.get_env("SENTRYPEER_SMTP_USERNAME"), - password: System.get_env("SENTRYPEER_SMTP_PASSWORD"), - tls: :always, - auth: :always, - port: System.get_env("SENTRYPEER_SMTP_PORT"), - retries: 2, - no_mx_lookups: false + adapter: Swoosh.Adapters.Sendgrid, + api_key: System.get_env("SENTRYPEER_SENDGRID_API_KEY") end # Stripe