diff --git a/config/docker.exs b/config/docker.exs
index 7d363172e556bbfd907fed523a00da869c6b23c8..cef88c266c6c667276ad905bb688156ff7dac32a 100644
--- a/config/docker.exs
+++ b/config/docker.exs
@@ -49,7 +49,7 @@ config :mobilizon, Mobilizon.Web.Email.Mailer,
   port: System.get_env("MOBILIZON_SMTP_PORT", "25"),
   username: System.get_env("MOBILIZON_SMTP_USERNAME", nil),
   password: System.get_env("MOBILIZON_SMTP_PASSWORD", nil),
-  tls: :if_available,
+  tls: System.get_env("MOBILIZON_SMTP_TLS", :if_available),
   allowed_tls_versions: [:"tlsv1.2", :"tlsv1.3"],
   tls_options: [
     verify: :verify_peer,
@@ -58,7 +58,7 @@ config :mobilizon, Mobilizon.Web.Email.Mailer,
     server_name_indication: ~c"#{System.get_env("MOBILIZON_SMTP_SERVER", "localhost")}",
     depth: 99
   ],
-  ssl: System.get_env("MOBILIZON_SMTP_SSL", "false"),
+  ssl: System.get_env("MOBILIZON_SMTP_SSL", false),
   retries: 1,
   no_mx_lookups: false,
   auth: :if_available