4 Commits
v1.0 ... v1.0.2

Author SHA1 Message Date
Andros Fenollosa
6d511ba330 Update project.clj 2020-06-11 18:34:34 +02:00
Andros Fenollosa
271ea0470b Add new config 2020-06-11 18:34:22 +02:00
Andros Fenollosa
a0adf79420 Update project.clj 2020-06-11 17:58:27 +02:00
Andros Fenollosa
b82a252bbe Fixbug 2020-06-11 17:55:24 +02:00
3 changed files with 4 additions and 4 deletions

View File

@@ -5,5 +5,5 @@ smtp-from: "api2smtp <no-reply@www.tadam-framework.dev>"
smtp-host: localhost smtp-host: localhost
smtp-user: smtp-user:
smtp-pass: smtp-pass:
smtp-ssl: false smtp-tls: false
smtp-port: 1025 smtp-port: 1025

View File

@@ -1,4 +1,4 @@
(defproject api2smtp "1.0.0" (defproject api2smtp "1.0.2"
:description "Send emails through an Endpoint API" :description "Send emails through an Endpoint API"
:url "https://github.com/tanrax/api2smtp" :url "https://github.com/tanrax/api2smtp"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
@@ -6,7 +6,7 @@
:dependencies [;; Clojure :dependencies [;; Clojure
[org.clojure/clojure "1.10.1"] [org.clojure/clojure "1.10.1"]
;; Tadam core ;; Tadam core
[tadam-core "0.4.0"] [tadam-core "0.4.2"]
;; HTTP Server ;; HTTP Server
[ring "1.8.0"] [ring "1.8.0"]
;; Ring middleware that prevents CSRF attacks ;; Ring middleware that prevents CSRF attacks

View File

@@ -16,7 +16,7 @@
:email (-> json :email) :email (-> json :email)
:message (-> json :message)}] :message (-> json :message)}]
;; Send email ;; Send email
(send config "to@email.com" "Contact" (render-template "emails/contact.html" params) (render-template "emails/contact.txt" params)) (send config (:smtp-to config) (:smtp-to config) (render-template "emails/contact.html" params) (render-template "emails/contact.txt" params))
;; Response OK ;; Response OK
(render-JSON req {:status "ok"}))) (render-JSON req {:status "ok"})))