 (ns salava.mail.mail
   (:require [clojure.java.io :as io]
+            [clojure.tools.logging :as log]
             [hiccup.core :refer :all]
             [postal.core :refer [send-message]]
             [salava.core.util :refer [get-site-url get-base-path get-site-name get-plugins plugin-fun]]

                     activation-link
                     "\n\n" (t :core/Emailactivation5 lng) "\n" (t :core/Emailactivation6 lng) ".\n\n" (t :core/Emailresetmessage2 lng) ".\n\n--  "
                      site-name " -"(t :core/Team lng))]
    (send-mail ctx subject message [email-address])))

(defn send-verification [ctx site-url email-verification-link fullname email lng]
  (let [site-name (get-in ctx [:config :core :site-name])

                     "\n\n" (t :core/Emailactivation5 lng) "\n" (t :core/Emailactivation6 lng) ".\n\n" (t :core/Emailactivation7 lng) "\n"
                     login-link
                     " " (t :core/Emailactivation8 lng) ".\n\n--  "site-name " -"(t :core/Team lng))]
    (log/info "sending to" email-address)
    (-> (send-mail ctx subject message [email-address]) log/info)))

(defn send-password-reset-message [ctx site-url activation-link fullname email-address lng]
  (let [site-name (get-in ctx [:config :core :site-name])
