I'm very new to Clojure/ClojureScript and have a question regarding a "proper" way to express something.
This code sends a mail using nodemailer on nodejs:
(defn send-mail [some-id]
(try
(let [clj-props (:mail (config/config-file)) ; get the mail server cofiguration
mail-address (mail-adress-from-props clj-props) ; get the mail address
mail (clj->js (create-mail mail-address some-id)) ; create a mail to send
transporter (.createTransport nodemailer (clj->js clj-props))] ; create a transporter using nodemailer
(.sendMail transporter mail on-mail-sent)) ; send mail using nodemailer
(catch js/Error e
(logging/error (.toString e)))))
It is working, but looks completely out of place in ClojureScript. I woud like for a more idiomatic way to do this, so any feedback is welcome.