mirror of
https://github.com/ClaperCo/Claper.git
synced 2025-12-16 03:47:56 +01:00
Fix empty auth smtp
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
- Add button to trigger product tour instead of automatically starting it
|
||||
- Improve design and UX for interactions and presentation settings in the manager view
|
||||
- Add pagination for events on the dashboard
|
||||
- Fix STMP adapter to work with secure connection
|
||||
|
||||
## v2.2.0
|
||||
|
||||
|
||||
@@ -190,8 +190,21 @@ case mail_transport do
|
||||
config :claper, Claper.Mailer,
|
||||
adapter: Swoosh.Adapters.Mua,
|
||||
relay: smtp_relay,
|
||||
port: smtp_port,
|
||||
auth: [username: smtp_username, password: smtp_password]
|
||||
port: smtp_port
|
||||
|
||||
cond do
|
||||
smtp_username && smtp_password ->
|
||||
config :claper, Claper.Mailer, auth: [username: smtp_username, password: smtp_password]
|
||||
|
||||
smtp_username || smtp_password ->
|
||||
raise ArgumentError, """
|
||||
Both SMTP_USERNAME and SMTP_PASSWORD must be set for SMTP authentication.
|
||||
Please provide values for both environment variables.
|
||||
"""
|
||||
|
||||
true ->
|
||||
nil
|
||||
end
|
||||
|
||||
config :swoosh, :api_client, false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user