From 6f87342229a96d470c18e1b37c8a1277f760646a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Vidal?= Date: Thu, 6 Jun 2024 14:28:51 -0300 Subject: [PATCH] Rename SMTP_REPLY_TO to SMTP_ADMIN_INBOX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andrés Vidal --- README.md | 2 +- backend/lib/richard_burton/application.ex | 2 +- backend/lib/richard_burton/mailer_smtp.ex | 5 ++--- docker-compose.base.yml | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6c66123b..da7fec30 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Environment variables are configuration units relevant to the app's build or run |`SMTP_FROM`|Default name to be used in behalf of the application|| |`SMTP_NAME`|Default name to be used in behalf of the application|`Richard & Isabel Burton`| |`SMTP_TLS`|Wether TLS is used in the communication to the SMTP service. Can be `always`, `never` or `if_available`| `if_available`| -|`SMTP_REPLY_TO`| Reply inbox to be addressed when answering to emails from this app. Also used as administrative inbox, for example, to receive "Contact Form" messages.| +|`SMTP_ADMIN_INBOX`| Administrative inbox, for example, to receive "Contact Form" messages.| diff --git a/backend/lib/richard_burton/application.ex b/backend/lib/richard_burton/application.ex index 5ee9ca2f..3d89889e 100644 --- a/backend/lib/richard_burton/application.ex +++ b/backend/lib/richard_burton/application.ex @@ -37,7 +37,7 @@ defmodule RichardBurton.Application do "SMTP_FROM", "SMTP_NAME", "SMTP_TLS", - "SMTP_REPLY_TO" + "SMTP_ADMIN_INBOX" ] |> Enum.map(&{&1, &1 |> String.downcase() |> String.to_atom()}) |> Enum.filter(fn {key, _} -> is_nil(System.get_env(key)) end) diff --git a/backend/lib/richard_burton/mailer_smtp.ex b/backend/lib/richard_burton/mailer_smtp.ex index 7ac42bc9..19569e40 100644 --- a/backend/lib/richard_burton/mailer_smtp.ex +++ b/backend/lib/richard_burton/mailer_smtp.ex @@ -39,7 +39,7 @@ defmodule RichardBurton.Mailer.SMTP do defp get_swoosh_email(email = %{message: message, address: address, to: nil}) do new( from: get_from(), - to: System.get_env("SMTP_REPLY_TO"), + to: System.get_env("SMTP_ADMIN_INBOX"), subject: get_subject(email), text_body: message, reply_to: address @@ -52,8 +52,7 @@ defmodule RichardBurton.Mailer.SMTP do from: get_from(), to: to, subject: subject, - text_body: message, - reply_to: System.get_env("SMTP_REPLY_TO") + text_body: message ) end diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 9846ee61..88d11d41 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -28,7 +28,7 @@ services: SMTP_FROM: $SMTP_FROM SMTP_NAME: $SMTP_NAME SMTP_TLS: $SMTP_TLS - SMTP_REPLY_TO: $SMTP_REPLY_TO + SMTP_ADMIN_INBOX: $SMTP_ADMIN_INBOX depends_on: - db