Configure outbound SMTP email via Swoosh with TLS

This commit is contained in:
Graham McIntire 2026-04-02 13:08:50 -05:00
parent 2f65c4648c
commit 2f9d645c50
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 13 additions and 12 deletions

View file

@ -14,8 +14,8 @@ config :microwaveprop, MicrowavepropWeb.Endpoint, cache_static_manifest: "priv/s
# config :microwaveprop, MicrowavepropWeb.Endpoint, # config :microwaveprop, MicrowavepropWeb.Endpoint,
# force_ssl: [rewrite_on: [:x_forwarded_proto]] # force_ssl: [rewrite_on: [:x_forwarded_proto]]
# Configure Swoosh API Client # SMTP adapter doesn't need an API client
config :swoosh, api_client: Swoosh.ApiClient.Req config :swoosh, api_client: false
# Runtime production configuration, including reading # Runtime production configuration, including reading

View file

@ -122,14 +122,15 @@ if config_env() == :prod do
# #
# config :microwaveprop, Microwaveprop.Mailer, # config :microwaveprop, Microwaveprop.Mailer,
# adapter: Swoosh.Adapters.Mailgun, # adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"), config :microwaveprop, Microwaveprop.Mailer,
# domain: System.get_env("MAILGUN_DOMAIN") adapter: Swoosh.Adapters.SMTP,
# relay: System.get_env("EMAIL_SERVER"),
# Most non-SMTP adapters require an API client. Swoosh supports Req, Hackney, port: 587,
# and Finch out-of-the-box. This configuration is typically done at username: System.get_env("EMAIL_USERNAME"),
# compile-time in your config/prod.exs: password: System.get_env("EMAIL_PASSWORD"),
# tls: :if_available,
# config :swoosh, :api_client, Swoosh.ApiClient.Req auth: :always,
# ssl: false
# See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
config :microwaveprop, :email_from, {"NTMS Propagation", "graham@w5isp.com"}
end end