diff --git a/backend/src/app/tasks/sendmail.clj b/backend/src/app/tasks/sendmail.clj index 26a94b266..dc3a95cc0 100644 --- a/backend/src/app/tasks/sendmail.clj +++ b/backend/src/app/tasks/sendmail.clj @@ -5,7 +5,7 @@ ;; This Source Code Form is "Incompatible With Secondary Licenses", as ;; defined by the Mozilla Public License, v. 2.0. ;; -;; Copyright (c) 2020 UXBOX Labs SL +;; Copyright (c) 2020-2021 UXBOX Labs SL (ns app.tasks.sendmail (:require diff --git a/backend/src/app/util/emails.clj b/backend/src/app/util/emails.clj index 444d71478..6ef357746 100644 --- a/backend/src/app/util/emails.clj +++ b/backend/src/app/util/emails.clj @@ -91,8 +91,8 @@ ^String charset)) (defn- assign-extra-headers - [^MimeMessage mmsg {:keys [headers custom-data] :as params}] - (let [headers (assoc headers "X-Sereno-Custom-Data" custom-data)] + [^MimeMessage mmsg {:keys [headers extra-data] :as params}] + (let [headers (assoc headers "X-Penpot-Data" extra-data)] (reduce-kv (fn [^MimeMessage mmsg k v] (doto mmsg (.addHeader (name k) (str v)))) @@ -223,11 +223,11 @@ (s/def ::from ::us/email) (s/def ::reply-to ::us/email) (s/def ::lang string?) -(s/def ::custom-data ::us/string) +(s/def ::extra-data ::us/string) (s/def ::context (s/keys :req-un [::to] - :opt-un [::reply-to ::from ::lang ::priority ::custom-data])) + :opt-un [::reply-to ::from ::lang ::priority ::extra-data])) (defn template-factory ([id] (template-factory id {})) @@ -249,8 +249,8 @@ :hint "seems like the template is wrong or does not exists." :context {:id id})) (cond-> (assoc email :id (name id)) - (:custom-data context) - (assoc :custom-data (:custom-data context)) + (:extra-data context) + (assoc :extra-data (:extra-data context)) (:from context) (assoc :from (:from context))