diff --git a/backend/resources/emails/en/register.mustache b/backend/resources/emails/en/register.mustache index 95cfc335b..70c8fd99f 100644 --- a/backend/resources/emails/en/register.mustache +++ b/backend/resources/emails/en/register.mustache @@ -3,7 +3,7 @@ Welcome to UXBOX. -- end -- begin :body-text -Hello {{user}}! +Hello {{name}}! Welcome to UXBOX. @@ -27,7 +27,7 @@ UXBOX team.
Hello {{user}}!
+Hello {{name}}!
Welcome to UXBOX.
UXBOX team.
diff --git a/backend/src/uxbox/emails.clj b/backend/src/uxbox/emails.clj index e65649b16..8a206eaf3 100644 --- a/backend/src/uxbox/emails.clj +++ b/backend/src/uxbox/emails.clj @@ -17,10 +17,14 @@ [uxbox.util.blob :as blob] [uxbox.util.spec :as us])) +;; --- Defaults + (def default-context {:static media/resolve-asset :comment (constantly nil)}) +;; --- Register Email + (s/def ::name ::us/string) (s/def ::register (s/keys :req-un [::name])) @@ -29,6 +33,8 @@ "A new profile registration welcome email." (emails/build ::register default-context)) +;; --- Public API + (defn render [email context] (let [defaults {:from (:email-from cfg/config) diff --git a/backend/src/uxbox/http/handlers.clj b/backend/src/uxbox/http/handlers.clj index b86fe9e51..351f481bf 100644 --- a/backend/src/uxbox/http/handlers.clj +++ b/backend/src/uxbox/http/handlers.clj @@ -6,10 +6,8 @@ (ns uxbox.http.handlers (:require - [clojure.tools.logging :as log] [promesa.core :as p] [uxbox.emails :as emails] - [uxbox.http.errors :as errors] [uxbox.http.session :as session] [uxbox.services.core :as sv] [uxbox.util.uuid :as uuid]))