Skip to content
Snippets Groups Projects
Verified Commit 5494cd66 authored by cyrinux's avatar cyrinux :construction_worker_tone1:
Browse files

fix: smtp config tweaks

parent 3afc0c52
No related branches found
No related tags found
No related merge requests found
Pipeline #31633 failed
......@@ -22,6 +22,7 @@ MOBILIZON_SMTP_PORT=25
MOBILIZON_SMTP_USERNAME=noreply@mobilizon.lan
MOBILIZON_SMTP_PASSWORD=password
MOBILIZON_SMTP_SSL=false
MOBILIZON_SMTP_NO_MX_LOOKUP=false
# When using docker for development, VITE_HOST must be set to 0.0.0.0
VITE_HOST=localhost
......@@ -129,6 +129,32 @@ config :mobilizon, Mobilizon.Web.Email.Mailer,
# can be `true`
no_mx_lookups: false
config :mobilizon, Mobilizon.Web.Email.Mailer,
adapter: Swoosh.Adapters.SMTP,
level: :info,
relay: System.get_env("MOBILIZON_SMTP_SERVER", "localhost"),
port: System.get_env("MOBILIZON_SMTP_PORT", "25"),
username: System.get_env("MOBILIZON_SMTP_USERNAME", nil),
password: System.get_env("MOBILIZON_SMTP_PASSWORD", nil),
no_mx_lookups: System.get_env("MOBILIZON_SMTP_NO_MX_LOOKUP", false),
auth: System.get_env("MOBILIZON_SMTP_AUTH", "if_available")
tls: System.get_env("MOBILIZON_SMTP_TLS", "if_available"),
tls_options:
:tls_certificate_check.options(System.get_env("MOBILIZON_SMTP_SERVER", "localhost")),
ssl: System.get_env("MOBILIZON_SMTP_SSL", "false"),
sockopts: [
versions: [:"tlsv1.2", :"tlsv1.3"],
verify: :verify_peer,
cacerts: :public_key.cacerts_get(),
depth: 4,
customize_hostname_check: [
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
],
],
retries: 1,
config :vite_phx,
release_app: :mobilizon,
# to tell prod and dev env appart
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment