Fix :public_key.cacerts_load error

This commit is contained in:
summersamara 2023-10-03 11:35:08 +02:00
parent 8b1598f8cc
commit 82e9493f44

View file

@ -128,7 +128,7 @@ config :mobilizon, Mobilizon.Web.Email.Mailer,
tls_options: [
verify: :verify_peer,
versions: [:"tlsv1.2", :"tlsv1.3"],
cacerts: if :public_key.cacerts_load(System.get_env("SSL_CERT_FILE")) == :ok do
cacerts: if System.get_env("SSL_CERT_FILE") != nil and :public_key.cacerts_load(System.get_env("SSL_CERT_FILE")) == :ok do
:public_key.cacerts_get()
end,
server_name_indication: ~c"localhost",